<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>PU2CLR RDA5807 Arduino Library: RDA5807/src/RDA5807.cpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectlogo"><img alt="Logo" src="LOGO.png"/></td>
  <td id="projectalign">
   <div id="projectname">PU2CLR RDA5807 Arduino Library<span id="projectnumber">&#160;1.1.8</span>
   </div>
   <div id="projectbrief">Arduino Library for RDA5807 Devices - By Ricardo Lima Caratti</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.6 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('_r_d_a5807_8cpp_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div class="header">
  <div class="headertitle"><div class="title">RDA5807.cpp</div></div>
</div><!--header-->
<div class="contents">
<a href="_r_d_a5807_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno">    2</span><span class="comment"> * @mainpage RDA5807 Arduino Library implementation</span></div>
<div class="line"><span class="lineno">    3</span><span class="comment"> * @details RDA5807 Arduino Library implementation. This is an Arduino library for the RDA5807, BROADCAST RECEIVER.</span></div>
<div class="line"><span class="lineno">    4</span><span class="comment"> * @details It works with I2C protocol and can provide an easier interface to control the RDA5807 device.&lt;br&gt;</span></div>
<div class="line"><span class="lineno">    5</span><span class="comment"> * @details This library was built based on &quot;RDA5807M - SINGLE-CHIP BROADCAST FM RADIO TUNER - Rev.1.1–Aug.2015&quot;</span></div>
<div class="line"><span class="lineno">    6</span><span class="comment"> * @details and RDA microelectronics RDA5807FP - SINGLE-CHIP BROADCAST FM RADIO TUNER</span></div>
<div class="line"><span class="lineno">    7</span><span class="comment"> * @details This library can be freely distributed using the MIT Free Software model.</span></div>
<div class="line"><span class="lineno">    8</span><span class="comment"> * @copyright Copyright (c) 2020 Ricardo Lima Caratti.</span></div>
<div class="line"><span class="lineno">    9</span><span class="comment"> * @author Ricardo LIma Caratti (pu2clr@gmail.com)</span></div>
<div class="line"><span class="lineno">   10</span><span class="comment"> */</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno">   11</span> </div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno">   12</span><span class="preprocessor">#</span><span class="preprocessor">include</span> <span class="preprocessor">&lt;</span><span class="preprocessor">RDA5807</span><span class="preprocessor">.</span><span class="preprocessor">h</span><span class="preprocessor">&gt;</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno">   13</span> </div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno">   14</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno">   15</span><span class="comment"> * @defgroup GA02 Basic Functions</span></div>
<div class="line"><span class="lineno">   16</span><span class="comment"> * @section GA02 Basic Functions</span></div>
<div class="line"><span class="lineno">   17</span><span class="comment"> */</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno">   18</span> </div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno">   19</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno">   20</span><span class="comment"> * @ingroup GA02</span></div>
<div class="line"><span class="lineno">   21</span><span class="comment"> * @brief Sets the Device GPIO pins</span></div>
<div class="line"><span class="lineno">   22</span><span class="comment"> * @details This method is useful to add control to the system via GPIO RDA devive pins.</span></div>
<div class="line"><span class="lineno">   23</span><span class="comment"> * @details For example: You can use these pins to control RDS and SEEK via interrupt.</span></div>
<div class="line"><span class="lineno">   24</span><span class="comment"> * @details GPIOs are General Purpose I/O pin.</span></div>
<div class="line"><span class="lineno">   25</span><span class="comment"> * @details GPIO setup</span></div>
<div class="line"><span class="lineno">   26</span><span class="comment"> * @details When GPIO1 (#1), gpioSetup can be: 00 = High impedance; 01 = Reserved; 10 = Low; 11 = High</span></div>
<div class="line"><span class="lineno">   27</span><span class="comment"> * @details When GPIO2 (#2), gpioSetup can be: 00 = High impedance; 01 = Interrupt (INT) 10 = Low; 11 = High</span></div>
<div class="line"><span class="lineno">   28</span><span class="comment"> * @details When GPIO3 (#3), gpioSetup can be: 00 = High impedance; 01 = Mono/Stereo indicator (ST) = Low; 11 = High</span></div>
<div class="line"><span class="lineno">   29</span><span class="comment"> *</span></div>
<div class="line"><span class="lineno">   30</span><span class="comment"> * @param gpioPin   gpio number (1, 2 or 3)</span></div>
<div class="line"><span class="lineno">   31</span><span class="comment"> * @param gpioSetup See description above</span></div>
<div class="line"><span class="lineno">   32</span><span class="comment"> * @param mcuPip    MCU (Arduino) pin connected to the gpio</span></div>
<div class="line"><span class="lineno">   33</span><span class="comment"> */</span></div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"><a class="line" href="group___g_a02.html#ga677eff1084b294696a32e3ca4dfe593b">   34</a></span><span class="keywordtype">void</span> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a02.html#ga677eff1084b294696a32e3ca4dfe593b">setGpio</a>(uint8_t gpioPin, uint8_t gpioSetup, <span class="keywordtype">int</span> mcuPin)</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno">   35</span>{</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno">   36</span>    <span class="keywordflow">switch</span> (gpioPin)</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno">   37</span>    {</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno">   38</span>    <span class="keywordflow">case</span> 1:</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno">   39</span>        <span class="keyword">this</span>-&gt;gpio1Control = mcuPin;</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno">   40</span>        reg04-&gt;refined.GPIO1 = gpioSetup;</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno">   41</span>        <span class="keywordflow">break</span>;</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno">   42</span>    <span class="keywordflow">case</span> 2:</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno">   43</span>        <span class="keyword">this</span>-&gt;gpio2Control = mcuPin;</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno">   44</span>        reg04-&gt;refined.GPIO2 = gpioSetup;</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno">   45</span>        <span class="keywordflow">break</span>;</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno">   46</span>    <span class="keywordflow">case</span> 3:</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno">   47</span>        <span class="keyword">this</span>-&gt;gpio3Control = mcuPin;</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno">   48</span>        reg04-&gt;refined.GPIO3 = gpioSetup;</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno">   49</span>        <span class="keywordflow">break</span>;</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno">   50</span>    <span class="keywordflow">default</span>:</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno">   51</span>        gpio1Control = gpio2Control = gpio3Control = -1;</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno">   52</span>    }</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno">   53</span>    setRegister(<a class="code hl_define" href="_r_d_a5807_8h.html#a88dee04c27a51e335798ab012dccbea1">REG04</a>, reg04-&gt;raw);</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno">   54</span>}</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno">   55</span> </div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno">   56</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno">   57</span><span class="comment"> * @ingroup GA02</span></div>
<div class="line"><span class="lineno">   58</span><span class="comment"> * @brief Sets Interrupt Mode</span></div>
<div class="line"><span class="lineno">   59</span><span class="comment"> * @details GPIO2 could be programmed to output a low interrupt (interrupt will be generated only with interrupt enable bit STCIEN is set to high) when seek/tune process completes</span></div>
<div class="line"><span class="lineno">   60</span><span class="comment"> * @details Setting STCIEN = 1 will generate a low pulse on GPIO2 when the interrupt occurs.</span></div>
<div class="line"><span class="lineno">   61</span><span class="comment"> * @details ATTENTION: This function affects the behavior of the GPIO2 pin. The register 0x04 GPIO2 attribute will be setted to 1</span></div>
<div class="line"><span class="lineno">   62</span><span class="comment"> * @param value  0 =  disable; 1 = enqble</span></div>
<div class="line"><span class="lineno">   63</span><span class="comment"> * @see setGpio</span></div>
<div class="line"><span class="lineno">   64</span><span class="comment"> */</span></div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"><a class="line" href="group___g_a02.html#gabd676c0e4ad20c6152a68f8daba64cb3">   65</a></span><span class="keywordtype">void</span> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a02.html#gabd676c0e4ad20c6152a68f8daba64cb3">setInterruptMode</a>(uint8_t value)</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno">   66</span>{</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno">   67</span>    reg04-&gt;refined.GPIO2 = value;  <span class="comment">// Sets the GPIO2 to deal with interrupt   </span></div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno">   68</span>    reg04-&gt;refined.STCIEN = value; <span class="comment">// Enable or disable interrupr </span></div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno">   69</span>    setRegister(<a class="code hl_define" href="_r_d_a5807_8h.html#a88dee04c27a51e335798ab012dccbea1">REG04</a>, reg04-&gt;raw);</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno">   70</span>}</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno">   71</span> </div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno">   72</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno">   73</span><span class="comment"> * @ingroup GA02</span></div>
<div class="line"><span class="lineno">   74</span><span class="comment"> * @brief Gets all current device status and RDS information registers (From 0x0A to 0x0F)</span></div>
<div class="line"><span class="lineno">   75</span><span class="comment"> * @see RDA5807M - SINGLE-CHIP BROADCAST FMRADIO TUNER; pages 5, 9, 12 and 13.</span></div>
<div class="line"><span class="lineno">   76</span><span class="comment"> * @see rda_reg0a, rda_reg0b, rda_reg0c, rda_reg0d, rda_reg0e, rda_reg0f</span></div>
<div class="line"><span class="lineno">   77</span><span class="comment"> * @see shadowStatusRegisters;</span></div>
<div class="line"><span class="lineno">   78</span><span class="comment"> */</span></div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"><a class="line" href="group___g_a02.html#gab9e3a5584a6238f719e9c9e49435f5ce">   79</a></span><span class="keywordtype">void</span> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a02.html#gab9e3a5584a6238f719e9c9e49435f5ce">getStatusRegisters</a>()</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno">   80</span>{</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno">   81</span>    word16_to_bytes aux;</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno">   82</span>    <span class="keywordtype">int</span> i;</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno">   83</span> </div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno">   84</span>    Wire.requestFrom(<span class="keyword">this</span>-&gt;deviceAddressFullAccess, 12); <span class="comment">// This call starts reading from 0x0A register</span></div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno">   85</span>    <span class="keywordflow">for</span> (i = 0; i &lt; 6; i++)</div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno">   86</span>    {</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno">   87</span>        aux.refined.highByte = Wire.read();</div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno">   88</span>        aux.refined.lowByte = Wire.read();</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno">   89</span>        shadowStatusRegisters[i] = aux.raw;</div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno">   90</span>    }</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno">   91</span>    Wire.endTransmission();</div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno">   92</span>}</div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno">   93</span> </div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno">   94</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno">   95</span><span class="comment"> * @ingroup GA02</span></div>
<div class="line"><span class="lineno">   96</span><span class="comment"> * @brief Gets the register content via direct access</span></div>
<div class="line"><span class="lineno">   97</span><span class="comment"> * @details this method is useful to deal with a specific register.</span></div>
<div class="line"><span class="lineno">   98</span><span class="comment"> * @param uint8_t register number</span></div>
<div class="line"><span class="lineno">   99</span><span class="comment"> * @return word16_to_bytes register content</span></div>
<div class="line"><span class="lineno">  100</span><span class="comment"> * @see  word16_to_bytes datatype in RDA5807.h</span></div>
<div class="line"><span class="lineno">  101</span><span class="comment"> */</span></div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"><a class="line" href="group___g_a02.html#ga69981ef141e22ab00e4bde3f18f84964">  102</a></span>word16_to_bytes <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::getDirectRegister(uint8_t reg)</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno">  103</span>{</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno">  104</span> </div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno">  105</span>    word16_to_bytes aux;</div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno">  106</span>    Wire.beginTransmission(<span class="keyword">this</span>-&gt;deviceAddressDirectAccess);</div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno">  107</span>    Wire.write(reg);</div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno">  108</span>    Wire.endTransmission(<span class="keyword">false</span>);</div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno">  109</span>    Wire.requestFrom(<span class="keyword">this</span>-&gt;deviceAddressDirectAccess, 2);</div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno">  110</span>    aux.refined.highByte = Wire.read();</div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno">  111</span>    aux.refined.lowByte = Wire.read();</div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno">  112</span>    Wire.endTransmission();</div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno">  113</span> </div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno">  114</span>    <span class="keywordflow">return</span> aux;</div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno">  115</span>}</div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno">  116</span> </div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno">  117</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno">  118</span><span class="comment"> * @ingroup GA02</span></div>
<div class="line"><span class="lineno">  119</span><span class="comment"> * @brief Gets the register content of a given status register (from 0x0A to 0x0F)</span></div>
<div class="line"><span class="lineno">  120</span><span class="comment"> * @details Useful when you need just a specific status register content.</span></div>
<div class="line"><span class="lineno">  121</span><span class="comment"> * @details This methos update the first element of the shadowStatusRegisters linked to the register</span></div>
<div class="line"><span class="lineno">  122</span><span class="comment"> * @return rdax_reg0a the reference to current value of the 0x0A register.</span></div>
<div class="line"><span class="lineno">  123</span><span class="comment"> */</span></div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"><a class="line" href="group___g_a02.html#ga1f4bc3d6f9d94171b2965dbb4e812f4f">  124</a></span><span class="keywordtype">void</span> *<a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a02.html#ga1f4bc3d6f9d94171b2965dbb4e812f4f">getStatus</a>(uint8_t reg)</div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno">  125</span>{</div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno">  126</span>    word16_to_bytes aux;</div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno">  127</span> </div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno">  128</span>    <span class="keywordflow">if</span> (reg &lt; 0x0A || reg &gt; 0x0F)</div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno">  129</span>        <span class="keywordflow">return</span> NULL; <span class="comment">// Maybe not necessary.</span></div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno">  130</span> </div>
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno">  131</span>    Wire.beginTransmission(<span class="keyword">this</span>-&gt;deviceAddressDirectAccess);</div>
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno">  132</span>    Wire.write(reg);</div>
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno">  133</span>    Wire.endTransmission(<span class="keyword">false</span>);</div>
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno">  134</span>    Wire.requestFrom(<span class="keyword">this</span>-&gt;deviceAddressDirectAccess, 2); <span class="comment">// reading 0x0A register</span></div>
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno">  135</span>    delayMicroseconds(250);</div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno">  136</span>    aux.refined.highByte = Wire.read();</div>
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno">  137</span>    aux.refined.lowByte = Wire.read();</div>
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno">  138</span>    Wire.endTransmission(<span class="keyword">true</span>);</div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno">  139</span>    shadowStatusRegisters[reg - 0x0A] = aux.raw;</div>
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno">  140</span> </div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno">  141</span>    <span class="keywordflow">return</span> &amp;shadowStatusRegisters[reg - 0x0A];</div>
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno">  142</span>}</div>
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno">  143</span> </div>
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno">  144</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno">  145</span><span class="comment"> * @ingroup GA02</span></div>
<div class="line"><span class="lineno">  146</span><span class="comment"> * @brief Sets a given value to a specific device register</span></div>
<div class="line"><span class="lineno">  147</span><span class="comment"> *</span></div>
<div class="line"><span class="lineno">  148</span><span class="comment"> * @see RDA5807M - SINGLE-CHIP BROADCAST FMRADIO TUNER; pages 5, 9, 10 and 11.</span></div>
<div class="line"><span class="lineno">  149</span><span class="comment"> * @see rda_reg02, rda_reg03, rda_reg04, rda_reg05, rda_reg06, rda_reg07</span></div>
<div class="line"><span class="lineno">  150</span><span class="comment"> *</span></div>
<div class="line"><span class="lineno">  151</span><span class="comment"> * @param reg    register number (valid values is between 0x02 and 0x07)</span></div>
<div class="line"><span class="lineno">  152</span><span class="comment"> * @param value  the unsigned 16 bits word value (see rda_rec0x data types)</span></div>
<div class="line"><span class="lineno">  153</span><span class="comment"> */</span></div>
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"><a class="line" href="group___g_a02.html#ga3b581b82ab8c631cfec537a47008ddf3">  154</a></span><span class="keywordtype">void</span> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a02.html#ga3b581b82ab8c631cfec537a47008ddf3">setRegister</a>(uint8_t reg, uint16_t value)</div>
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno">  155</span>{</div>
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno">  156</span>    word16_to_bytes aux;</div>
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno">  157</span>    <span class="keywordflow">if</span> (reg &gt; 8)</div>
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno">  158</span>        <span class="keywordflow">return</span>; <span class="comment">// Maybe not necessary.</span></div>
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno">  159</span>    Wire.beginTransmission(<span class="keyword">this</span>-&gt;deviceAddressDirectAccess);</div>
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno">  160</span>    Wire.write(reg);</div>
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno">  161</span>    aux.raw = value;</div>
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno">  162</span>    Wire.write(aux.refined.highByte);</div>
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno">  163</span>    Wire.write(aux.refined.lowByte);</div>
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno">  164</span>    Wire.endTransmission();</div>
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno">  165</span>    shadowRegisters[reg] = aux.raw; <span class="comment">// Updates the shadowRegisters element</span></div>
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno">  166</span>    delayMicroseconds(3000);        <span class="comment">// Check</span></div>
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno">  167</span>}</div>
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno">  168</span> </div>
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno">  169</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno">  170</span><span class="comment"> * @ingroup GA02</span></div>
<div class="line"><span class="lineno">  171</span><span class="comment"> * @brief Waits for Seek or Tune finish</span></div>
<div class="line"><span class="lineno">  172</span><span class="comment"> */</span></div>
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"><a class="line" href="group___g_a02.html#ga3fe1feed45d3290beba0efef491128e6">  173</a></span><span class="keywordtype">void</span> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a02.html#ga3fe1feed45d3290beba0efef491128e6">waitAndFinishTune</a>()</div>
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno">  174</span>{</div>
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno">  175</span>    <span class="keywordflow">do</span></div>
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno">  176</span>    {</div>
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno">  177</span>        getStatus(<a class="code hl_define" href="_r_d_a5807_8h.html#a5ec596211175cecd682755f5e996b6dd">REG0A</a>);</div>
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno">  178</span>    } <span class="keywordflow">while</span> (reg0a-&gt;refined.STC == 0);</div>
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno">  179</span>}</div>
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno">  180</span> </div>
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno">  181</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno">  182</span><span class="comment"> * @ingroup GA02</span></div>
<div class="line"><span class="lineno">  183</span><span class="comment"> * @brief Resets the device</span></div>
<div class="line"><span class="lineno">  184</span><span class="comment"> * @details The RDA5807M is RESET itself When VIO is Power up.</span></div>
<div class="line"><span class="lineno">  185</span><span class="comment"> * @details Also, it support soft reset by triggering the 0x02 register (rda_reg02) bit 1 from 0 to 1.</span></div>
<div class="line"><span class="lineno">  186</span><span class="comment"> */</span></div>
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"><a class="line" href="group___g_a02.html#ga3f6dace4c93f82ec66da5641e3e3fdaa">  187</a></span><span class="keywordtype">void</span> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a02.html#ga3f6dace4c93f82ec66da5641e3e3fdaa">softReset</a>()</div>
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno">  188</span>{</div>
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno">  189</span>    reg02-&gt;refined.SOFT_RESET = 1;</div>
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno">  190</span>    setRegister(<a class="code hl_define" href="_r_d_a5807_8h.html#a09a3d3fef9f53f0dbe1dd0072f02c1d4">REG02</a>, reg02-&gt;raw);</div>
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno">  191</span>}</div>
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno">  192</span> </div>
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno">  193</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno">  194</span><span class="comment"> * @ingroup GA02</span></div>
<div class="line"><span class="lineno">  195</span><span class="comment"> * @brief Powers the receiver on</span></div>
<div class="line"><span class="lineno">  196</span><span class="comment"> */</span></div>
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno"><a class="line" href="group___g_a02.html#ga30d2b0c4662922df53bcef118663329c">  197</a></span><span class="keywordtype">void</span> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a02.html#ga30d2b0c4662922df53bcef118663329c">powerUp</a>()</div>
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno">  198</span>{</div>
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno">  199</span>    reg02-&gt;raw = 0;</div>
<div class="line"><a id="l00200" name="l00200"></a><span class="lineno">  200</span>    reg02-&gt;refined.NEW_METHOD = 0;</div>
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno">  201</span>    reg02-&gt;refined.RDS_EN = 0; <span class="comment">// RDS disable</span></div>
<div class="line"><a id="l00202" name="l00202"></a><span class="lineno">  202</span>    reg02-&gt;refined.CLK_MODE = <span class="keyword">this</span>-&gt;clockFrequency;</div>
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno">  203</span>    reg02-&gt;refined.RCLK_DIRECT_IN = <span class="keyword">this</span>-&gt;oscillatorType;</div>
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno">  204</span>    reg02-&gt;refined.NON_CALIBRATE = <span class="keyword">this</span>-&gt;rlckNoCalibrate;</div>
<div class="line"><a id="l00205" name="l00205"></a><span class="lineno">  205</span>    reg02-&gt;refined.MONO = 1;  <span class="comment">// Force mono</span></div>
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno">  206</span>    reg02-&gt;refined.DMUTE = 1; <span class="comment">// Normal operation</span></div>
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno">  207</span>    reg02-&gt;refined.DHIZ = 1;  <span class="comment">// Normal operation</span></div>
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno">  208</span>    reg02-&gt;refined.ENABLE = 1;</div>
<div class="line"><a id="l00209" name="l00209"></a><span class="lineno">  209</span>    reg02-&gt;refined.BASS = 1;</div>
<div class="line"><a id="l00210" name="l00210"></a><span class="lineno">  210</span>    reg02-&gt;refined.SEEK = 0;</div>
<div class="line"><a id="l00211" name="l00211"></a><span class="lineno">  211</span> </div>
<div class="line"><a id="l00212" name="l00212"></a><span class="lineno">  212</span>    setRegister(<a class="code hl_define" href="_r_d_a5807_8h.html#a09a3d3fef9f53f0dbe1dd0072f02c1d4">REG02</a>, reg02-&gt;raw);</div>
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno">  213</span> </div>
<div class="line"><a id="l00214" name="l00214"></a><span class="lineno">  214</span>    reg05-&gt;raw = 0x00;</div>
<div class="line"><a id="l00215" name="l00215"></a><span class="lineno">  215</span>    reg05-&gt;refined.INT_MODE = 0;</div>
<div class="line"><a id="l00216" name="l00216"></a><span class="lineno">  216</span>    reg05-&gt;refined.LNA_PORT_SEL = 2;</div>
<div class="line"><a id="l00217" name="l00217"></a><span class="lineno">  217</span>    reg05-&gt;refined.LNA_ICSEL_BIT = 0;</div>
<div class="line"><a id="l00218" name="l00218"></a><span class="lineno">  218</span>    reg05-&gt;refined.SEEKTH = 8; <span class="comment">// 0b1000</span></div>
<div class="line"><a id="l00219" name="l00219"></a><span class="lineno">  219</span>    reg05-&gt;refined.VOLUME = 0;</div>
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno">  220</span> </div>
<div class="line"><a id="l00221" name="l00221"></a><span class="lineno">  221</span>    setRegister(<a class="code hl_define" href="_r_d_a5807_8h.html#a848ac333ddfea97bc1f16a2e69eaf953">REG05</a>, reg05-&gt;raw);</div>
<div class="line"><a id="l00222" name="l00222"></a><span class="lineno">  222</span>}</div>
<div class="line"><a id="l00223" name="l00223"></a><span class="lineno">  223</span> </div>
<div class="line"><a id="l00224" name="l00224"></a><span class="lineno">  224</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno">  225</span><span class="comment"> * @ingroup GA02</span></div>
<div class="line"><span class="lineno">  226</span><span class="comment"> * @brief Sets new demodulate method. It can improve the receiver sensitivity about 1dB</span></div>
<div class="line"><span class="lineno">  227</span><span class="comment"> *</span></div>
<div class="line"><span class="lineno">  228</span><span class="comment"> * @param value  true or false</span></div>
<div class="line"><span class="lineno">  229</span><span class="comment"> */</span></div>
<div class="line"><a id="l00230" name="l00230"></a><span class="lineno"><a class="line" href="group___g_a02.html#gab97c1c8ad3ab0cd5d2852f712caee0a1">  230</a></span><span class="keywordtype">void</span> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a02.html#gab97c1c8ad3ab0cd5d2852f712caee0a1">setNewDemodulateMethod</a>(<span class="keywordtype">bool</span> value)</div>
<div class="line"><a id="l00231" name="l00231"></a><span class="lineno">  231</span>{</div>
<div class="line"><a id="l00232" name="l00232"></a><span class="lineno">  232</span>    reg02-&gt;refined.NEW_METHOD = value;</div>
<div class="line"><a id="l00233" name="l00233"></a><span class="lineno">  233</span>    setRegister(<a class="code hl_define" href="_r_d_a5807_8h.html#a09a3d3fef9f53f0dbe1dd0072f02c1d4">REG02</a>, reg02-&gt;raw);</div>
<div class="line"><a id="l00234" name="l00234"></a><span class="lineno">  234</span>}</div>
<div class="line"><a id="l00235" name="l00235"></a><span class="lineno">  235</span> </div>
<div class="line"><a id="l00236" name="l00236"></a><span class="lineno">  236</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno">  237</span><span class="comment"> * @ingroup GA02</span></div>
<div class="line"><span class="lineno">  238</span><span class="comment"> * @brief Power the receiver off</span></div>
<div class="line"><span class="lineno">  239</span><span class="comment"> */</span></div>
<div class="line"><a id="l00240" name="l00240"></a><span class="lineno"><a class="line" href="group___g_a02.html#ga214f631aef72ece69db73c99879c7c46">  240</a></span><span class="keywordtype">void</span> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a02.html#ga214f631aef72ece69db73c99879c7c46">powerDown</a>()</div>
<div class="line"><a id="l00241" name="l00241"></a><span class="lineno">  241</span>{</div>
<div class="line"><a id="l00242" name="l00242"></a><span class="lineno">  242</span>    reg02-&gt;refined.SEEK = 0;</div>
<div class="line"><a id="l00243" name="l00243"></a><span class="lineno">  243</span>    reg02-&gt;refined.ENABLE = 0;</div>
<div class="line"><a id="l00244" name="l00244"></a><span class="lineno">  244</span>    setRegister(<a class="code hl_define" href="_r_d_a5807_8h.html#a09a3d3fef9f53f0dbe1dd0072f02c1d4">REG02</a>, reg02-&gt;raw);</div>
<div class="line"><a id="l00245" name="l00245"></a><span class="lineno">  245</span>}</div>
<div class="line"><a id="l00246" name="l00246"></a><span class="lineno">  246</span> </div>
<div class="line"><a id="l00247" name="l00247"></a><span class="lineno">  247</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno">  248</span><span class="comment"> * @ingroup GA02</span></div>
<div class="line"><span class="lineno">  249</span><span class="comment"> * @brief Starts the device</span></div>
<div class="line"><span class="lineno">  250</span><span class="comment"> * @details You can select the colck type and the frequency</span></div>
<div class="line"><span class="lineno">  251</span><span class="comment"> * @details oscillator type: OSCILLATOR_TYPE_CRYSTAL = passive crystal; OSCILLATOR_TYPE_REFCLK = active crystal or signal generator</span></div>
<div class="line"><span class="lineno">  252</span><span class="comment"> * @details Clock type: CLOCK_32K, CLOCK_12M, CLOCK_13M, CLOCK_19_2M, CLOCK_24M, CLOCK_26M and CLOCK_38_4M</span></div>
<div class="line"><span class="lineno">  253</span><span class="comment"> * @code {.cpp}</span></div>
<div class="line"><span class="lineno">  254</span><span class="comment"> * #include &lt;RDA5807.h&gt; </span></div>
<div class="line"><span class="lineno">  255</span><span class="comment"> * RDA5807 rx; </span></div>
<div class="line"><span class="lineno">  256</span><span class="comment"> * void setup() {</span></div>
<div class="line"><span class="lineno">  257</span><span class="comment"> *    rx.setup(); // Starts the receiver with default parameters</span></div>
<div class="line"><span class="lineno">  258</span><span class="comment"> *    // rx.setup(CLOCK_32K, OSCILLATOR_TYPE_ACTIVE);  // 32.768kHz Active Crystal</span></div>
<div class="line"><span class="lineno">  259</span><span class="comment"> *    // rx.setup(CLOCK_12M, OSCILLATOR_TYPE_PASSIVE); // 12MHz passive crystal </span></div>
<div class="line"><span class="lineno">  260</span><span class="comment"> *    // rx.setup(CLOCK_38_4M, OSCILLATOR_TYPE_PASSIVE); // 38.4 MHz passive crystal</span></div>
<div class="line"><span class="lineno">  261</span><span class="comment"> *    rx.setFrequency(10390); // Tunes at 103.9 MHz  </span></div>
<div class="line"><span class="lineno">  262</span><span class="comment"> * }</span></div>
<div class="line"><span class="lineno">  263</span><span class="comment"> * void loop() {</span></div>
<div class="line"><span class="lineno">  264</span><span class="comment"> * }</span></div>
<div class="line"><span class="lineno">  265</span><span class="comment"> * @endcode</span></div>
<div class="line"><span class="lineno">  266</span><span class="comment"> * </span></div>
<div class="line"><span class="lineno">  267</span><span class="comment"> * @param clock_frequency    optional; Clock frequency. Default 32.768 kHz.</span></div>
<div class="line"><span class="lineno">  268</span><span class="comment"> * @param oscillator_type    optional; Sets the Oscillator type (passive or active crystal); default: passive Crystal.</span></div>
<div class="line"><span class="lineno">  269</span><span class="comment"> * @param rlck_no_calibrate  optional; if 0=RCLK clock is always supply; 1=RCLK clock is not always supply when FM work</span></div>
<div class="line"><span class="lineno">  270</span><span class="comment"> * @see OSCILLATOR_TYPE_PASSIVE, OSCILLATOR_TYPE_ACTIVE, RLCK_NO_CALIBRATE_MODE_ON, RLCK_NO_CALIBRATE_MODE_OFF</span></div>
<div class="line"><span class="lineno">  271</span><span class="comment"> * @see powerUp, rda_reg02</span></div>
<div class="line"><span class="lineno">  272</span><span class="comment"> */</span></div>
<div class="line"><a id="l00273" name="l00273"></a><span class="lineno"><a class="line" href="group___g_a02.html#ga272444216a784ea5317c83783eb2bfe7">  273</a></span><span class="keywordtype">void</span> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a02.html#ga272444216a784ea5317c83783eb2bfe7">setup</a>(uint8_t clock_frequency, uint8_t oscillator_type, uint8_t rlck_no_calibrate)</div>
<div class="line"><a id="l00274" name="l00274"></a><span class="lineno">  274</span>{</div>
<div class="line"><a id="l00275" name="l00275"></a><span class="lineno">  275</span>    <span class="keyword">this</span>-&gt;oscillatorType = oscillator_type;</div>
<div class="line"><a id="l00276" name="l00276"></a><span class="lineno">  276</span>    <span class="keyword">this</span>-&gt;clockFrequency = clock_frequency;</div>
<div class="line"><a id="l00277" name="l00277"></a><span class="lineno">  277</span>    <span class="keyword">this</span>-&gt;rlckNoCalibrate = rlck_no_calibrate;</div>
<div class="line"><a id="l00278" name="l00278"></a><span class="lineno">  278</span> </div>
<div class="line"><a id="l00279" name="l00279"></a><span class="lineno">  279</span>    Wire.begin();</div>
<div class="line"><a id="l00280" name="l00280"></a><span class="lineno">  280</span> </div>
<div class="line"><a id="l00281" name="l00281"></a><span class="lineno">  281</span>    delay(10);</div>
<div class="line"><a id="l00282" name="l00282"></a><span class="lineno">  282</span>    <a class="code hl_function" href="group___g_a02.html#ga30d2b0c4662922df53bcef118663329c">powerUp</a><a class="code hl_function" href="group___g_a02.html#ga30d2b0c4662922df53bcef118663329c">(</a><a class="code hl_function" href="group___g_a02.html#ga30d2b0c4662922df53bcef118663329c">)</a>;</div>
<div class="line"><a id="l00283" name="l00283"></a><span class="lineno">  283</span>    delay(<span class="keyword">this</span>-&gt;maxDelayAftarCrystalOn);</div>
<div class="line"><a id="l00284" name="l00284"></a><span class="lineno">  284</span>}</div>
<div class="line"><a id="l00285" name="l00285"></a><span class="lineno">  285</span> </div>
<div class="line"><a id="l00286" name="l00286"></a><span class="lineno">  286</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno">  287</span><span class="comment"> * @ingroup GA02</span></div>
<div class="line"><span class="lineno">  288</span><span class="comment"> * @brief Gets the Device identification</span></div>
<div class="line"><span class="lineno">  289</span><span class="comment"> * @return device number Id</span></div>
<div class="line"><span class="lineno">  290</span><span class="comment"> */</span></div>
<div class="line"><a id="l00291" name="l00291"></a><span class="lineno"><a class="line" href="group___g_a02.html#gad1d589d43adc89a93c5e07b2d4cb6a4c">  291</a></span><a class="code hl_function" href="group___g_a02.html#gad1d589d43adc89a93c5e07b2d4cb6a4c">uint16_t</a> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a02.html#gad1d589d43adc89a93c5e07b2d4cb6a4c">getDeviceId</a>()</div>
<div class="line"><a id="l00292" name="l00292"></a><span class="lineno">  292</span>{</div>
<div class="line"><a id="l00293" name="l00293"></a><span class="lineno">  293</span>    reg00-&gt;raw = getDirectRegister(0x0).raw;</div>
<div class="line"><a id="l00294" name="l00294"></a><span class="lineno">  294</span>    <span class="keywordflow">return</span> reg00-&gt;raw;</div>
<div class="line"><a id="l00295" name="l00295"></a><span class="lineno">  295</span>}</div>
<div class="line"><a id="l00296" name="l00296"></a><span class="lineno">  296</span> </div>
<div class="line"><a id="l00297" name="l00297"></a><span class="lineno">  297</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno">  298</span><span class="comment"> * @defgroup GA03 FM Tune Functions</span></div>
<div class="line"><span class="lineno">  299</span><span class="comment"> * @section GA03 FM Tune</span></div>
<div class="line"><span class="lineno">  300</span><span class="comment"> */</span></div>
<div class="line"><a id="l00301" name="l00301"></a><span class="lineno">  301</span> </div>
<div class="line"><a id="l00302" name="l00302"></a><span class="lineno">  302</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno">  303</span><span class="comment"> * @ingroup GA03</span></div>
<div class="line"><span class="lineno">  304</span><span class="comment"> * @brief Sets Soft Blend.</span></div>
<div class="line"><span class="lineno">  305</span><span class="comment"> *</span></div>
<div class="line"><span class="lineno">  306</span><span class="comment"> * @param value  true or false</span></div>
<div class="line"><span class="lineno">  307</span><span class="comment"> */</span></div>
<div class="line"><a id="l00308" name="l00308"></a><span class="lineno"><a class="line" href="group___g_a03.html#ga6dd81b0cff50747906d7d05b127112de">  308</a></span><span class="keywordtype">void</span> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a03.html#ga6dd81b0cff50747906d7d05b127112de">setSoftBlendEnable</a>(<span class="keywordtype">bool</span> value)</div>
<div class="line"><a id="l00309" name="l00309"></a><span class="lineno">  309</span>{</div>
<div class="line"><a id="l00310" name="l00310"></a><span class="lineno">  310</span>    reg07-&gt;refined.SOFTBLEND_EN = value;</div>
<div class="line"><a id="l00311" name="l00311"></a><span class="lineno">  311</span>    setRegister(<a class="code hl_define" href="_r_d_a5807_8h.html#a2a41df49654ae321f569bfabfa74de24">REG07</a>, reg07-&gt;raw);</div>
<div class="line"><a id="l00312" name="l00312"></a><span class="lineno">  312</span>}</div>
<div class="line"><a id="l00313" name="l00313"></a><span class="lineno">  313</span> </div>
<div class="line"><a id="l00314" name="l00314"></a><span class="lineno">  314</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno">  315</span><span class="comment"> * @ingroup GA03</span></div>
<div class="line"><span class="lineno">  316</span><span class="comment"> * @brief Sets AFC true or false</span></div>
<div class="line"><span class="lineno">  317</span><span class="comment"> *</span></div>
<div class="line"><span class="lineno">  318</span><span class="comment"> * @param value  true or false</span></div>
<div class="line"><span class="lineno">  319</span><span class="comment"> */</span></div>
<div class="line"><a id="l00320" name="l00320"></a><span class="lineno"><a class="line" href="group___g_a03.html#ga965658767399e2f923852144e324805f">  320</a></span><span class="keywordtype">void</span> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a03.html#ga965658767399e2f923852144e324805f">setAFC</a>(<span class="keywordtype">bool</span> value)</div>
<div class="line"><a id="l00321" name="l00321"></a><span class="lineno">  321</span>{</div>
<div class="line"><a id="l00322" name="l00322"></a><span class="lineno">  322</span>    reg04-&gt;refined.AFCD = value;</div>
<div class="line"><a id="l00323" name="l00323"></a><span class="lineno">  323</span>    setRegister(<a class="code hl_define" href="_r_d_a5807_8h.html#a88dee04c27a51e335798ab012dccbea1">REG04</a>, reg04-&gt;raw);</div>
<div class="line"><a id="l00324" name="l00324"></a><span class="lineno">  324</span>}</div>
<div class="line"><a id="l00325" name="l00325"></a><span class="lineno">  325</span> </div>
<div class="line"><a id="l00326" name="l00326"></a><span class="lineno">  326</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno">  327</span><span class="comment"> * @ingroup GA03</span></div>
<div class="line"><span class="lineno">  328</span><span class="comment"> * @brief Sets the channel</span></div>
<div class="line"><span class="lineno">  329</span><span class="comment"> * @details This method tunes the rteceiver in a given channel.</span></div>
<div class="line"><span class="lineno">  330</span><span class="comment"> * @details The channel can be calculated by using the follow formula</span></div>
<div class="line"><span class="lineno">  331</span><span class="comment"> * @details channel = (desired frequency - start band frequency) / space channel in use / 10.0);</span></div>
<div class="line"><span class="lineno">  332</span><span class="comment"> *</span></div>
<div class="line"><span class="lineno">  333</span><span class="comment"> * @see setFrequency, setBand, setSpace</span></div>
<div class="line"><span class="lineno">  334</span><span class="comment"> * @see RDA5807M - SINGLE-CHIP BROADCAST FM RADIO TUNER - Rev.1.1–Aug.2015; pages 9 and 12.</span></div>
<div class="line"><span class="lineno">  335</span><span class="comment"> *</span></div>
<div class="line"><span class="lineno">  336</span><span class="comment"> * @param channel</span></div>
<div class="line"><span class="lineno">  337</span><span class="comment"> */</span></div>
<div class="line"><a id="l00338" name="l00338"></a><span class="lineno"><a class="line" href="group___g_a03.html#gaa9cfaddbd43257e810bb3817b021fa8a">  338</a></span><span class="keywordtype">void</span> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a03.html#gaa9cfaddbd43257e810bb3817b021fa8a">setChannel</a>(uint16_t channel)</div>
<div class="line"><a id="l00339" name="l00339"></a><span class="lineno">  339</span>{</div>
<div class="line"><a id="l00340" name="l00340"></a><span class="lineno">  340</span>    reg03-&gt;refined.CHAN = channel;</div>
<div class="line"><a id="l00341" name="l00341"></a><span class="lineno">  341</span>    reg03-&gt;refined.TUNE = 1;</div>
<div class="line"><a id="l00342" name="l00342"></a><span class="lineno">  342</span>    reg03-&gt;refined.BAND = <span class="keyword">this</span>-&gt;currentFMBand;</div>
<div class="line"><a id="l00343" name="l00343"></a><span class="lineno">  343</span>    reg03-&gt;refined.SPACE = <span class="keyword">this</span>-&gt;currentFMSpace;</div>
<div class="line"><a id="l00344" name="l00344"></a><span class="lineno">  344</span>    reg03-&gt;refined.DIRECT_MODE = 0;</div>
<div class="line"><a id="l00345" name="l00345"></a><span class="lineno">  345</span>    setRegister(<a class="code hl_define" href="_r_d_a5807_8h.html#ac2446f96334b533154259a21c13950e6">REG03</a>, reg03-&gt;raw);</div>
<div class="line"><a id="l00346" name="l00346"></a><span class="lineno">  346</span>    <a class="code hl_function" href="group___g_a02.html#ga3fe1feed45d3290beba0efef491128e6">waitAndFinishTune</a><a class="code hl_function" href="group___g_a02.html#ga3fe1feed45d3290beba0efef491128e6">(</a><a class="code hl_function" href="group___g_a02.html#ga3fe1feed45d3290beba0efef491128e6">)</a>;</div>
<div class="line"><a id="l00347" name="l00347"></a><span class="lineno">  347</span>}</div>
<div class="line"><a id="l00348" name="l00348"></a><span class="lineno">  348</span> </div>
<div class="line"><a id="l00349" name="l00349"></a><span class="lineno">  349</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno">  350</span><span class="comment"> * @ingroup GA03</span></div>
<div class="line"><span class="lineno">  351</span><span class="comment"> * @brief Sets the frequency</span></div>
<div class="line"><span class="lineno">  352</span><span class="comment"> * @details Tunes the receiver at a given frequency. Example:</span></div>
<div class="line"><span class="lineno">  353</span><span class="comment"> * @code {.cpp}</span></div>
<div class="line"><span class="lineno">  354</span><span class="comment"> * #include &lt;RDA5807.h&gt; </span></div>
<div class="line"><span class="lineno">  355</span><span class="comment"> * RDA5807 rx; </span></div>
<div class="line"><span class="lineno">  356</span><span class="comment"> * void setup() {</span></div>
<div class="line"><span class="lineno">  357</span><span class="comment"> *  pinMode(4, INPUT_PULLUP); // Arduino pin 4 - Frequency Up</span></div>
<div class="line"><span class="lineno">  358</span><span class="comment"> *  pinMode(5, INPUT_PULLUP); // Arduino pin 5 - Frequency Down</span></div>
<div class="line"><span class="lineno">  359</span><span class="comment"> *  rx.setup(); </span></div>
<div class="line"><span class="lineno">  360</span><span class="comment"> *  rx.setFrequency(10390); // Tunes at 103.9 MHz </span></div>
<div class="line"><span class="lineno">  361</span><span class="comment"> * }</span></div>
<div class="line"><span class="lineno">  362</span><span class="comment"> * void loop() {</span></div>
<div class="line"><span class="lineno">  363</span><span class="comment"> *  if (digitalRead(4) == LOW) rx.setFrequencyUp();</span></div>
<div class="line"><span class="lineno">  364</span><span class="comment"> *  if (digitalRead(5) == LOW) rx.setFrequencyDown();</span></div>
<div class="line"><span class="lineno">  365</span><span class="comment"> *  delay(200);</span></div>
<div class="line"><span class="lineno">  366</span><span class="comment"> * }</span></div>
<div class="line"><span class="lineno">  367</span><span class="comment"> * @endcode</span></div>
<div class="line"><span class="lineno">  368</span><span class="comment"> * </span></div>
<div class="line"><span class="lineno">  369</span><span class="comment"> * @param frequency - an integer with the frequency value (Example: 7600=76MHz, 10790 = 107,90MHz)</span></div>
<div class="line"><span class="lineno">  370</span><span class="comment"> * @see setFrequencyUp, setFrequencyDown, getFrequency</span></div>
<div class="line"><span class="lineno">  371</span><span class="comment"> */</span></div>
<div class="line"><a id="l00372" name="l00372"></a><span class="lineno"><a class="line" href="group___g_a03.html#gad16a6afa9520b77498b17a72c226305a">  372</a></span><span class="keywordtype">void</span> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a03.html#gad16a6afa9520b77498b17a72c226305a">setFrequency</a>(uint16_t frequency)</div>
<div class="line"><a id="l00373" name="l00373"></a><span class="lineno">  373</span>{</div>
<div class="line"><a id="l00374" name="l00374"></a><span class="lineno">  374</span>    uint16_t channel = (frequency - <span class="keyword">this</span>-&gt;startBand[currentFMBand]) / (<span class="keyword">this</span>-&gt;fmSpace[<span class="keyword">this</span>-&gt;currentFMSpace]);</div>
<div class="line"><a id="l00375" name="l00375"></a><span class="lineno">  375</span>    setChannel(channel);</div>
<div class="line"><a id="l00376" name="l00376"></a><span class="lineno">  376</span>    <span class="keyword">this</span>-&gt;currentFrequency = frequency;</div>
<div class="line"><a id="l00377" name="l00377"></a><span class="lineno">  377</span>}</div>
<div class="line"><a id="l00378" name="l00378"></a><span class="lineno">  378</span> </div>
<div class="line"><a id="l00379" name="l00379"></a><span class="lineno">  379</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno">  380</span><span class="comment"> * @ingroup GA03</span></div>
<div class="line"><span class="lineno">  381</span><span class="comment"> * @brief Sets the frequency using the reg08 (direct frequency)</span></div>
<div class="line"><span class="lineno">  382</span><span class="comment"> * @details valid when frequency mode is 1</span></div>
<div class="line"><span class="lineno">  383</span><span class="comment"> * @param frequency</span></div>
<div class="line"><span class="lineno">  384</span><span class="comment"> */</span></div>
<div class="line"><a id="l00385" name="l00385"></a><span class="lineno"><a class="line" href="group___g_a03.html#ga4b15ce7408d1d38989d9afdb6483b1f4">  385</a></span><span class="keywordtype">void</span> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a03.html#ga4b15ce7408d1d38989d9afdb6483b1f4">setDirectFrequency</a>(uint16_t frequency)</div>
<div class="line"><a id="l00386" name="l00386"></a><span class="lineno">  386</span>{</div>
<div class="line"><a id="l00387" name="l00387"></a><span class="lineno">  387</span>    reg08-&gt;directFrequency = frequency;</div>
<div class="line"><a id="l00388" name="l00388"></a><span class="lineno">  388</span>    setRegister(<a class="code hl_define" href="_r_d_a5807_8h.html#a96f1c217ac648e08bc64dd3b9086612c">REG08</a>, reg08-&gt;directFrequency);</div>
<div class="line"><a id="l00389" name="l00389"></a><span class="lineno">  389</span>    <span class="keyword">this</span>-&gt;currentFrequency = frequency;</div>
<div class="line"><a id="l00390" name="l00390"></a><span class="lineno">  390</span>}</div>
<div class="line"><a id="l00391" name="l00391"></a><span class="lineno">  391</span> </div>
<div class="line"><a id="l00392" name="l00392"></a><span class="lineno">  392</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno">  393</span><span class="comment"> * @ingroup GA03</span></div>
<div class="line"><span class="lineno">  394</span><span class="comment"> * @brief Sets the frequency mode.  If 1, then freq setting changed.</span></div>
<div class="line"><span class="lineno">  395</span><span class="comment"> * @param value ( default = 0 or 1)</span></div>
<div class="line"><span class="lineno">  396</span><span class="comment"> */</span></div>
<div class="line"><a id="l00397" name="l00397"></a><span class="lineno"><a class="line" href="group___g_a03.html#gae0c05586e7230063b0c42fd5f4b24906">  397</a></span><span class="keywordtype">void</span> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a03.html#gae0c05586e7230063b0c42fd5f4b24906">setFrequencyMode</a>(uint8_t value)</div>
<div class="line"><a id="l00398" name="l00398"></a><span class="lineno">  398</span>{</div>
<div class="line"><a id="l00399" name="l00399"></a><span class="lineno">  399</span>    reg07-&gt;refined.FREQ_MODE = value;</div>
<div class="line"><a id="l00400" name="l00400"></a><span class="lineno">  400</span>    setRegister(<a class="code hl_define" href="_r_d_a5807_8h.html#a2a41df49654ae321f569bfabfa74de24">REG07</a>, reg07-&gt;raw);</div>
<div class="line"><a id="l00401" name="l00401"></a><span class="lineno">  401</span>}</div>
<div class="line"><a id="l00402" name="l00402"></a><span class="lineno">  402</span> </div>
<div class="line"><a id="l00403" name="l00403"></a><span class="lineno">  403</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno">  404</span><span class="comment"> * @ingroup GA03</span></div>
<div class="line"><span class="lineno">  405</span><span class="comment"> * @brief Increments the current frequency</span></div>
<div class="line"><span class="lineno">  406</span><span class="comment"> * @details The increment uses the band space as step. See array: uint16_t fmSpace[4] = {100/10, 200/10, 50/10, 25/10};</span></div>
<div class="line"><span class="lineno">  407</span><span class="comment"> * @code {.cpp}</span></div>
<div class="line"><span class="lineno">  408</span><span class="comment"> * #include &lt;RDA5807.h&gt; </span></div>
<div class="line"><span class="lineno">  409</span><span class="comment"> * RDA5807 rx; </span></div>
<div class="line"><span class="lineno">  410</span><span class="comment"> * void setup() {</span></div>
<div class="line"><span class="lineno">  411</span><span class="comment"> *  pinMode(4, INPUT_PULLUP); // Arduino pin 4 - Frequency Up</span></div>
<div class="line"><span class="lineno">  412</span><span class="comment"> *  pinMode(5, INPUT_PULLUP); // Arduino pin 5 - Frequency Down</span></div>
<div class="line"><span class="lineno">  413</span><span class="comment"> *  rx.setup(); </span></div>
<div class="line"><span class="lineno">  414</span><span class="comment"> *  rx.setFrequency(10390); // Tunes at 103.9 MHz </span></div>
<div class="line"><span class="lineno">  415</span><span class="comment"> * }</span></div>
<div class="line"><span class="lineno">  416</span><span class="comment"> * void loop() {</span></div>
<div class="line"><span class="lineno">  417</span><span class="comment"> *  if (digitalRead(4) == LOW) rx.setFrequencyUp();</span></div>
<div class="line"><span class="lineno">  418</span><span class="comment"> *  if (digitalRead(5) == LOW) rx.setFrequencyDown();</span></div>
<div class="line"><span class="lineno">  419</span><span class="comment"> *  delay(200);</span></div>
<div class="line"><span class="lineno">  420</span><span class="comment"> * }</span></div>
<div class="line"><span class="lineno">  421</span><span class="comment"> * @endcode</span></div>
<div class="line"><span class="lineno">  422</span><span class="comment"> * @see setFrequency, getFrequency</span></div>
<div class="line"><span class="lineno">  423</span><span class="comment"> */</span></div>
<div class="line"><a id="l00424" name="l00424"></a><span class="lineno"><a class="line" href="group___g_a03.html#ga4e8db177fea475ea00fa04e3d8f1f08c">  424</a></span><span class="keywordtype">void</span> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a03.html#ga4e8db177fea475ea00fa04e3d8f1f08c">setFrequencyUp</a>()</div>
<div class="line"><a id="l00425" name="l00425"></a><span class="lineno">  425</span>{</div>
<div class="line"><a id="l00426" name="l00426"></a><span class="lineno">  426</span>    <span class="keywordflow">if</span> (<span class="keyword">this</span>-&gt;currentFrequency &lt; <span class="keyword">this</span>-&gt;endBand[<span class="keyword">this</span>-&gt;currentFMBand])</div>
<div class="line"><a id="l00427" name="l00427"></a><span class="lineno">  427</span>        <span class="keyword">this</span>-&gt;currentFrequency += (<span class="keyword">this</span>-&gt;fmSpace[currentFMSpace]);</div>
<div class="line"><a id="l00428" name="l00428"></a><span class="lineno">  428</span>    <span class="keywordflow">else</span></div>
<div class="line"><a id="l00429" name="l00429"></a><span class="lineno">  429</span>        <span class="keyword">this</span>-&gt;currentFrequency = <span class="keyword">this</span>-&gt;startBand[<span class="keyword">this</span>-&gt;currentFMBand];</div>
<div class="line"><a id="l00430" name="l00430"></a><span class="lineno">  430</span> </div>
<div class="line"><a id="l00431" name="l00431"></a><span class="lineno">  431</span>    setFrequency(<span class="keyword">this</span>-&gt;currentFrequency);</div>
<div class="line"><a id="l00432" name="l00432"></a><span class="lineno">  432</span>}</div>
<div class="line"><a id="l00433" name="l00433"></a><span class="lineno">  433</span> </div>
<div class="line"><a id="l00434" name="l00434"></a><span class="lineno">  434</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno">  435</span><span class="comment"> * @ingroup GA03</span></div>
<div class="line"><span class="lineno">  436</span><span class="comment"> * @brief Decrements the current frequency</span></div>
<div class="line"><span class="lineno">  437</span><span class="comment"> * @details The drecrement uses the band space as step. See array: uint16_t fmSpace[4] = {20, 10, 5, 1};</span></div>
<div class="line"><span class="lineno">  438</span><span class="comment"> */</span></div>
<div class="line"><a id="l00439" name="l00439"></a><span class="lineno"><a class="line" href="group___g_a03.html#gadba771c864ace7a8373a76554b9d3e6a">  439</a></span><span class="keywordtype">void</span> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a03.html#gadba771c864ace7a8373a76554b9d3e6a">setFrequencyDown</a>()</div>
<div class="line"><a id="l00440" name="l00440"></a><span class="lineno">  440</span>{</div>
<div class="line"><a id="l00441" name="l00441"></a><span class="lineno">  441</span>    <span class="keywordflow">if</span> (<span class="keyword">this</span>-&gt;currentFrequency &gt; <span class="keyword">this</span>-&gt;startBand[<span class="keyword">this</span>-&gt;currentFMBand])</div>
<div class="line"><a id="l00442" name="l00442"></a><span class="lineno">  442</span>        <span class="keyword">this</span>-&gt;currentFrequency -= (<span class="keyword">this</span>-&gt;fmSpace[currentFMSpace]);</div>
<div class="line"><a id="l00443" name="l00443"></a><span class="lineno">  443</span>    <span class="keywordflow">else</span></div>
<div class="line"><a id="l00444" name="l00444"></a><span class="lineno">  444</span>        <span class="keyword">this</span>-&gt;currentFrequency = <span class="keyword">this</span>-&gt;endBand[<span class="keyword">this</span>-&gt;currentFMBand];</div>
<div class="line"><a id="l00445" name="l00445"></a><span class="lineno">  445</span> </div>
<div class="line"><a id="l00446" name="l00446"></a><span class="lineno">  446</span>    setFrequency(<span class="keyword">this</span>-&gt;currentFrequency);</div>
<div class="line"><a id="l00447" name="l00447"></a><span class="lineno">  447</span>}</div>
<div class="line"><a id="l00448" name="l00448"></a><span class="lineno">  448</span> </div>
<div class="line"><a id="l00449" name="l00449"></a><span class="lineno">  449</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno">  450</span><span class="comment"> * @ingroup GA03</span></div>
<div class="line"><span class="lineno">  451</span><span class="comment"> * @brief Gets the current frequency.</span></div>
<div class="line"><span class="lineno">  452</span><span class="comment"> * @return uint16_t</span></div>
<div class="line"><span class="lineno">  453</span><span class="comment"> */</span></div>
<div class="line"><a id="l00454" name="l00454"></a><span class="lineno"><a class="line" href="group___g_a03.html#ga59b981002d383a13731bd939482a5236">  454</a></span><a class="code hl_function" href="group___g_a03.html#ga59b981002d383a13731bd939482a5236">uint16_t</a> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a03.html#ga59b981002d383a13731bd939482a5236">getFrequency</a>()</div>
<div class="line"><a id="l00455" name="l00455"></a><span class="lineno">  455</span>{</div>
<div class="line"><a id="l00456" name="l00456"></a><span class="lineno">  456</span>    <span class="keywordflow">return</span> <span class="keyword">this</span>-&gt;currentFrequency;</div>
<div class="line"><a id="l00457" name="l00457"></a><span class="lineno">  457</span>}</div>
<div class="line"><a id="l00458" name="l00458"></a><span class="lineno">  458</span> </div>
<div class="line"><a id="l00459" name="l00459"></a><span class="lineno">  459</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno">  460</span><span class="comment"> * @ingroup GA03</span></div>
<div class="line"><span class="lineno">  461</span><span class="comment"> * @brief Gets the current channel stored in 0x0A status register.</span></div>
<div class="line"><span class="lineno">  462</span><span class="comment"> *</span></div>
<div class="line"><span class="lineno">  463</span><span class="comment"> * @see setChannel, setFrequency, setBand, setSpace</span></div>
<div class="line"><span class="lineno">  464</span><span class="comment"> * @see RDA5807M - SINGLE-CHIP BROADCAST FM RADIO TUNER - Rev.1.1–Aug.2015; pages 9 and 12.</span></div>
<div class="line"><span class="lineno">  465</span><span class="comment"> *</span></div>
<div class="line"><span class="lineno">  466</span><span class="comment"> * @return uint16_t current channel value</span></div>
<div class="line"><span class="lineno">  467</span><span class="comment"> */</span></div>
<div class="line"><a id="l00468" name="l00468"></a><span class="lineno"><a class="line" href="group___g_a03.html#ga39480a49f7878fffe8c3ddf120aba2b0">  468</a></span><a class="code hl_function" href="group___g_a03.html#ga39480a49f7878fffe8c3ddf120aba2b0">uint16_t</a> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a03.html#ga39480a49f7878fffe8c3ddf120aba2b0">getRealChannel</a>()</div>
<div class="line"><a id="l00469" name="l00469"></a><span class="lineno">  469</span>{</div>
<div class="line"><a id="l00470" name="l00470"></a><span class="lineno">  470</span>    getStatus(<a class="code hl_define" href="_r_d_a5807_8h.html#a5ec596211175cecd682755f5e996b6dd">REG0A</a>);</div>
<div class="line"><a id="l00471" name="l00471"></a><span class="lineno">  471</span>    <span class="keywordflow">return</span> reg0a-&gt;refined.READCHAN;</div>
<div class="line"><a id="l00472" name="l00472"></a><span class="lineno">  472</span>}</div>
<div class="line"><a id="l00473" name="l00473"></a><span class="lineno">  473</span> </div>
<div class="line"><a id="l00474" name="l00474"></a><span class="lineno">  474</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno">  475</span><span class="comment"> * @ingroup GA03</span></div>
<div class="line"><span class="lineno">  476</span><span class="comment"> * @brief Gets the current frequency bases on the current channel.</span></div>
<div class="line"><span class="lineno">  477</span><span class="comment"> * @details The current channel is stored in the 0x0A register. This value is updated after a tune or seek operation.</span></div>
<div class="line"><span class="lineno">  478</span><span class="comment"> * @details The current frequency can be calculated by the formula below</span></div>
<div class="line"><span class="lineno">  479</span><span class="comment"> *</span></div>
<div class="line"><span class="lineno">  480</span><span class="comment"> * | Band   | Formula |</span></div>
<div class="line"><span class="lineno">  481</span><span class="comment"> * | ------ | ------- |</span></div>
<div class="line"><span class="lineno">  482</span><span class="comment"> * |    0   | Frequency = Channel Spacing (kHz) x READCHAN[9:0]+ 87.0 MHz |</span></div>
<div class="line"><span class="lineno">  483</span><span class="comment"> * | 1 or 2 | Frequency = Channel Spacing (kHz) x READCHAN[9:0]+ 76.0 MHz |</span></div>
<div class="line"><span class="lineno">  484</span><span class="comment"> * |    3   | Frequency = Channel Spacing (kHz) x READCHAN[9:0]+ 65.0 MHz |</span></div>
<div class="line"><span class="lineno">  485</span><span class="comment"> *</span></div>
<div class="line"><span class="lineno">  486</span><span class="comment"> * @see setChannel, setFrequency, setBand, setSpace</span></div>
<div class="line"><span class="lineno">  487</span><span class="comment"> * @see RDA5807M - SINGLE-CHIP BROADCAST FM RADIO TUNER - Rev.1.1–Aug.2015; pages 9 and 12.</span></div>
<div class="line"><span class="lineno">  488</span><span class="comment"> * @return uint16_t</span></div>
<div class="line"><span class="lineno">  489</span><span class="comment"> */</span></div>
<div class="line"><a id="l00490" name="l00490"></a><span class="lineno"><a class="line" href="group___g_a03.html#ga1476967ed4e1d9bc00e2ea8e3135520e">  490</a></span><a class="code hl_function" href="group___g_a03.html#ga1476967ed4e1d9bc00e2ea8e3135520e">uint16_t</a> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a03.html#ga1476967ed4e1d9bc00e2ea8e3135520e">getRealFrequency</a>()</div>
<div class="line"><a id="l00491" name="l00491"></a><span class="lineno">  491</span>{</div>
<div class="line"><a id="l00492" name="l00492"></a><span class="lineno">  492</span>    <span class="keywordflow">return</span> getRealChannel() * (<span class="keyword">this</span>-&gt;fmSpace[<span class="keyword">this</span>-&gt;currentFMSpace]) + <span class="keyword">this</span>-&gt;startBand[currentFMBand];</div>
<div class="line"><a id="l00493" name="l00493"></a><span class="lineno">  493</span>}</div>
<div class="line"><a id="l00494" name="l00494"></a><span class="lineno">  494</span> </div>
<div class="line"><a id="l00495" name="l00495"></a><span class="lineno">  495</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno">  496</span><span class="comment"> * @ingroup GA03</span></div>
<div class="line"><span class="lineno">  497</span><span class="comment"> * @brief Seek function</span></div>
<div class="line"><span class="lineno">  498</span><span class="comment"> * @details look for next or previous station available. Example:</span></div>
<div class="line"><span class="lineno">  499</span><span class="comment"> * @code {.cpp}</span></div>
<div class="line"><span class="lineno">  500</span><span class="comment"> * #include &lt;RDA5807.h&gt; </span></div>
<div class="line"><span class="lineno">  501</span><span class="comment"> * RDA5807 rx; </span></div>
<div class="line"><span class="lineno">  502</span><span class="comment"> * void setup() {</span></div>
<div class="line"><span class="lineno">  503</span><span class="comment"> *    pinMode(4, INPUT_PULLUP); // Arduino pin 4 - Seek station down</span></div>
<div class="line"><span class="lineno">  504</span><span class="comment"> *    pinMode(5, INPUT_PULLUP); // Arduino pin 5 - Seek station up</span></div>
<div class="line"><span class="lineno">  505</span><span class="comment"> *    rx.setup(); // Starts the receiver with default parameters</span></div>
<div class="line"><span class="lineno">  506</span><span class="comment"> *    rx.setFrequency(10390); // Tunes at 103.9 MHz  - Switch to your local favorite station</span></div>
<div class="line"><span class="lineno">  507</span><span class="comment"> * }</span></div>
<div class="line"><span class="lineno">  508</span><span class="comment"> * void loop() {</span></div>
<div class="line"><span class="lineno">  509</span><span class="comment"> *   if (digitalRead(4) == LOW) rx.seek(RDA_SEEK_WRAP,RDA_SEEK_DOWN);</span></div>
<div class="line"><span class="lineno">  510</span><span class="comment"> *   if (digitalRead(5) == LOW) rx.seek(RDA_SEEK_WRAP,RDA_SEEK_UP);</span></div>
<div class="line"><span class="lineno">  511</span><span class="comment"> *   delay(200);</span></div>
<div class="line"><span class="lineno">  512</span><span class="comment"> * }</span></div>
<div class="line"><span class="lineno">  513</span><span class="comment"> * @endcode</span></div>
<div class="line"><span class="lineno">  514</span><span class="comment"> * </span></div>
<div class="line"><span class="lineno">  515</span><span class="comment"> * @param seek_mode  if 0, wrap at the upper or lower band limit and continue seeking; 1 = stop seeking at the upper or lower band limit</span></div>
<div class="line"><span class="lineno">  516</span><span class="comment"> * @param direction  if 0, seek down; if 1, seek up.</span></div>
<div class="line"><span class="lineno">  517</span><span class="comment"> */</span></div>
<div class="line"><a id="l00518" name="l00518"></a><span class="lineno"><a class="line" href="group___g_a03.html#ga87de696f0a40724c19c89b6b48766020">  518</a></span><span class="keywordtype">void</span> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a03.html#ga87de696f0a40724c19c89b6b48766020">seek</a>(uint8_t seek_mode, uint8_t direction)</div>
<div class="line"><a id="l00519" name="l00519"></a><span class="lineno">  519</span>{</div>
<div class="line"><a id="l00520" name="l00520"></a><span class="lineno">  520</span>    reg02-&gt;refined.SEEK = 1;</div>
<div class="line"><a id="l00521" name="l00521"></a><span class="lineno">  521</span>    reg02-&gt;refined.SKMODE = seek_mode;</div>
<div class="line"><a id="l00522" name="l00522"></a><span class="lineno">  522</span>    reg02-&gt;refined.SEEKUP = direction;</div>
<div class="line"><a id="l00523" name="l00523"></a><span class="lineno">  523</span>    setRegister(<a class="code hl_define" href="_r_d_a5807_8h.html#a09a3d3fef9f53f0dbe1dd0072f02c1d4">REG02</a>, reg02-&gt;raw);</div>
<div class="line"><a id="l00524" name="l00524"></a><span class="lineno">  524</span>    setFrequency(getRealFrequency());</div>
<div class="line"><a id="l00525" name="l00525"></a><span class="lineno">  525</span>}</div>
<div class="line"><a id="l00526" name="l00526"></a><span class="lineno">  526</span> </div>
<div class="line"><a id="l00527" name="l00527"></a><span class="lineno">  527</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno">  528</span><span class="comment"> * @ingroup GA03</span></div>
<div class="line"><span class="lineno">  529</span><span class="comment"> * @brief Seek function</span></div>
<div class="line"><span class="lineno">  530</span><span class="comment"> * @details Seeks a station up or down.</span></div>
<div class="line"><span class="lineno">  531</span><span class="comment"> * @details Seek up or down a station and call a function defined by the user to show the frequency during the seek process.</span></div>
<div class="line"><span class="lineno">  532</span><span class="comment"> * @details Seek begins at the current channel, and goes in the direction specified with the SEEKUP bit. Seek operation stops when a channel is qualified as valid according to the seek parameters, the entire band has been searched (SKMODE = 0), or the upper or lower band limit has been reached (SKMODE = 1).</span></div>
<div class="line"><span class="lineno">  533</span><span class="comment"> * @details The STC bit is set high when the seek operation completes and/or the SF/BL bit is set high if the seek operation was unable to find a channel qualified as valid according to the seek parameters. The STC and SF/BL bits must be set low by setting the SEEK bit low before the next seek or tune may begin.</span></div>
<div class="line"><span class="lineno">  534</span><span class="comment"> * @details The SEEK bit is set low and the STC bit is set high when the seek operation completes.</span></div>
<div class="line"><span class="lineno">  535</span><span class="comment"> * @details It is important to say you have to implement a show frequency function. This function have to get the frequency via getFrequency function.</span></div>
<div class="line"><span class="lineno">  536</span><span class="comment"> * @details Example:</span></div>
<div class="line"><span class="lineno">  537</span><span class="comment"> * @code</span></div>
<div class="line"><span class="lineno">  538</span><span class="comment"> *</span></div>
<div class="line"><span class="lineno">  539</span><span class="comment"> * SI470X rx;</span></div>
<div class="line"><span class="lineno">  540</span><span class="comment"> *</span></div>
<div class="line"><span class="lineno">  541</span><span class="comment"> * void showFrequency() {</span></div>
<div class="line"><span class="lineno">  542</span><span class="comment"> *    uint16_t freq = rx.getFrequency();</span></div>
<div class="line"><span class="lineno">  543</span><span class="comment"> *    Serial.print(freq);</span></div>
<div class="line"><span class="lineno">  544</span><span class="comment"> *    Serial.println(&quot;MHz &quot;);</span></div>
<div class="line"><span class="lineno">  545</span><span class="comment"> * }</span></div>
<div class="line"><span class="lineno">  546</span><span class="comment"> *</span></div>
<div class="line"><span class="lineno">  547</span><span class="comment"> * void loop() {</span></div>
<div class="line"><span class="lineno">  548</span><span class="comment"> *  .</span></div>
<div class="line"><span class="lineno">  549</span><span class="comment"> *  .</span></div>
<div class="line"><span class="lineno">  550</span><span class="comment"> *      rx.seek(RDA_SEEK_WRAP, RDA_SEEK_UP, showFrequency); // Seek Up</span></div>
<div class="line"><span class="lineno">  551</span><span class="comment"> *  .</span></div>
<div class="line"><span class="lineno">  552</span><span class="comment"> *  .</span></div>
<div class="line"><span class="lineno">  553</span><span class="comment"> * }</span></div>
<div class="line"><span class="lineno">  554</span><span class="comment"> * @endcode</span></div>
<div class="line"><span class="lineno">  555</span><span class="comment"> * @param seek_mode  Seek Mode; 0 = Wrap at the upper or lower band limit and continue seeking (default); 1 = Stop seeking at the upper or lower band limit.</span></div>
<div class="line"><span class="lineno">  556</span><span class="comment"> * @param direction  Seek Direction; 0 = Seek down (default); 1 = Seek up.</span></div>
<div class="line"><span class="lineno">  557</span><span class="comment"> * @param showFunc  function that you have to implement to show the frequency during the seeking process. Set NULL if you do not want to show the progress.</span></div>
<div class="line"><span class="lineno">  558</span><span class="comment"> */</span></div>
<div class="line"><a id="l00559" name="l00559"></a><span class="lineno"><a class="line" href="group___g_a03.html#gade55e697c7752811086300e710727397">  559</a></span><span class="keywordtype">void</span> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a03.html#gade55e697c7752811086300e710727397">seek</a>(uint8_t seek_mode, uint8_t direction, <span class="keywordtype">void</span> (*showFunc)())</div>
<div class="line"><a id="l00560" name="l00560"></a><span class="lineno">  560</span>{</div>
<div class="line"><a id="l00561" name="l00561"></a><span class="lineno">  561</span>    getStatus(<a class="code hl_define" href="_r_d_a5807_8h.html#a5ec596211175cecd682755f5e996b6dd">REG0A</a>);</div>
<div class="line"><a id="l00562" name="l00562"></a><span class="lineno">  562</span>    <span class="keywordflow">do</span></div>
<div class="line"><a id="l00563" name="l00563"></a><span class="lineno">  563</span>    {</div>
<div class="line"><a id="l00564" name="l00564"></a><span class="lineno">  564</span>        reg02-&gt;refined.SEEK = 1;</div>
<div class="line"><a id="l00565" name="l00565"></a><span class="lineno">  565</span>        reg02-&gt;refined.SKMODE = seek_mode;</div>
<div class="line"><a id="l00566" name="l00566"></a><span class="lineno">  566</span>        reg02-&gt;refined.SEEKUP = direction;</div>
<div class="line"><a id="l00567" name="l00567"></a><span class="lineno">  567</span>        setRegister(<a class="code hl_define" href="_r_d_a5807_8h.html#a09a3d3fef9f53f0dbe1dd0072f02c1d4">REG02</a>, reg02-&gt;raw);</div>
<div class="line"><a id="l00568" name="l00568"></a><span class="lineno">  568</span>        <span class="keyword">this</span>-&gt;currentFrequency = getRealFrequency(); <span class="comment">// gets the current seek frequency</span></div>
<div class="line"><a id="l00569" name="l00569"></a><span class="lineno">  569</span>        <span class="keywordflow">if</span> (showFunc != NULL)</div>
<div class="line"><a id="l00570" name="l00570"></a><span class="lineno">  570</span>        {</div>
<div class="line"><a id="l00571" name="l00571"></a><span class="lineno">  571</span>            showFunc();</div>
<div class="line"><a id="l00572" name="l00572"></a><span class="lineno">  572</span>        }</div>
<div class="line"><a id="l00573" name="l00573"></a><span class="lineno">  573</span>        delay(10);</div>
<div class="line"><a id="l00574" name="l00574"></a><span class="lineno">  574</span>        getStatus(<a class="code hl_define" href="_r_d_a5807_8h.html#a5ec596211175cecd682755f5e996b6dd">REG0A</a>);</div>
<div class="line"><a id="l00575" name="l00575"></a><span class="lineno">  575</span>    } <span class="keywordflow">while</span> (reg0a-&gt;refined.STC == 0);</div>
<div class="line"><a id="l00576" name="l00576"></a><span class="lineno">  576</span>    <a class="code hl_function" href="group___g_a02.html#ga3fe1feed45d3290beba0efef491128e6">waitAndFinishTune</a><a class="code hl_function" href="group___g_a02.html#ga3fe1feed45d3290beba0efef491128e6">(</a><a class="code hl_function" href="group___g_a02.html#ga3fe1feed45d3290beba0efef491128e6">)</a>;</div>
<div class="line"><a id="l00577" name="l00577"></a><span class="lineno">  577</span>    setFrequency(getRealFrequency()); <span class="comment">// Fixes station found.</span></div>
<div class="line"><a id="l00578" name="l00578"></a><span class="lineno">  578</span>}</div>
<div class="line"><a id="l00579" name="l00579"></a><span class="lineno">  579</span> </div>
<div class="line"><a id="l00580" name="l00580"></a><span class="lineno">  580</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno">  581</span><span class="comment"> * @ingroup GA03</span></div>
<div class="line"><span class="lineno">  582</span><span class="comment"> * @brief Sets RSSI Seek Threshold</span></div>
<div class="line"><span class="lineno">  583</span><span class="comment"> * @param  value</span></div>
<div class="line"><span class="lineno">  584</span><span class="comment"> */</span></div>
<div class="line"><a id="l00585" name="l00585"></a><span class="lineno"><a class="line" href="group___g_a03.html#ga41dbf6ea359175b3671072a3c382d42c">  585</a></span><span class="keywordtype">void</span> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a03.html#ga41dbf6ea359175b3671072a3c382d42c">setSeekThreshold</a>(uint8_t value)</div>
<div class="line"><a id="l00586" name="l00586"></a><span class="lineno">  586</span>{</div>
<div class="line"><a id="l00587" name="l00587"></a><span class="lineno">  587</span>    reg05-&gt;refined.SEEKTH = value;</div>
<div class="line"><a id="l00588" name="l00588"></a><span class="lineno">  588</span>    setRegister(<a class="code hl_define" href="_r_d_a5807_8h.html#a848ac333ddfea97bc1f16a2e69eaf953">REG05</a>, reg05-&gt;raw);</div>
<div class="line"><a id="l00589" name="l00589"></a><span class="lineno">  589</span>}</div>
<div class="line"><a id="l00590" name="l00590"></a><span class="lineno">  590</span> </div>
<div class="line"><a id="l00591" name="l00591"></a><span class="lineno">  591</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno">  592</span><span class="comment"> * @ingroup GA03</span></div>
<div class="line"><span class="lineno">  593</span><span class="comment"> * @brief Sets the FM band. See table below.</span></div>
<div class="line"><span class="lineno">  594</span><span class="comment"> *</span></div>
<div class="line"><span class="lineno">  595</span><span class="comment"> * FM band table</span></div>
<div class="line"><span class="lineno">  596</span><span class="comment"> *</span></div>
<div class="line"><span class="lineno">  597</span><span class="comment"> * | Value | Decimal | Description                 |</span></div>
<div class="line"><span class="lineno">  598</span><span class="comment"> * | ----- | ------- | --------------------------- |</span></div>
<div class="line"><span class="lineno">  599</span><span class="comment"> * | 00    | 0       | 87–108 MHz (US/Europe)      |</span></div>
<div class="line"><span class="lineno">  600</span><span class="comment"> * | 01    | 1       | 76–91 MHz (Japan)           |</span></div>
<div class="line"><span class="lineno">  601</span><span class="comment"> * | 10    | 2       | 76–108 MHz (world wide)     |</span></div>
<div class="line"><span class="lineno">  602</span><span class="comment"> * | 11    | 3       | 65 –76 MHz (East Europe) or 50-65MHz (see bit 9 of gegister 0x07) |</span></div>
<div class="line"><span class="lineno">  603</span><span class="comment"> *</span></div>
<div class="line"><span class="lineno">  604</span><span class="comment"> * @details if you are using the band 3 with 50 to 65 MHz setup, the setFrequencyUp, setFrequencyDown, setFrequencyToBeginBand and setFrequencyToEndBand</span></div>
<div class="line"><span class="lineno">  605</span><span class="comment"> * @details will not work properly. In this case, you have control the limits of the band by yourself.</span></div>
<div class="line"><span class="lineno">  606</span><span class="comment"> * @code {.cpp}</span></div>
<div class="line"><span class="lineno">  607</span><span class="comment"> * #include &lt;RDA5807.h&gt;</span></div>
<div class="line"><span class="lineno">  608</span><span class="comment"> * RDA5807 rx;</span></div>
<div class="line"><span class="lineno">  609</span><span class="comment"> * void setup() {</span></div>
<div class="line"><span class="lineno">  610</span><span class="comment"> *   rx.setup();</span></div>
<div class="line"><span class="lineno">  611</span><span class="comment"> *   rx.setBand(2); // Sets band: 76–108 MHz (world wide)  </span></div>
<div class="line"><span class="lineno">  612</span><span class="comment"> *   rx.setFrequency(10390); // Tunes at 103.9 MHz</span></div>
<div class="line"><span class="lineno">  613</span><span class="comment"> * }</span></div>
<div class="line"><span class="lineno">  614</span><span class="comment"> * void loop() {</span></div>
<div class="line"><span class="lineno">  615</span><span class="comment"> * }</span></div>
<div class="line"><span class="lineno">  616</span><span class="comment"> * @endcode</span></div>
<div class="line"><span class="lineno">  617</span><span class="comment"> * </span></div>
<div class="line"><span class="lineno">  618</span><span class="comment"> * @param band FM band index. See table above.</span></div>
<div class="line"><span class="lineno">  619</span><span class="comment"> * @see  setBand3_50_65_Mode, getBand3Status</span></div>
<div class="line"><span class="lineno">  620</span><span class="comment"> */</span></div>
<div class="line"><a id="l00621" name="l00621"></a><span class="lineno"><a class="line" href="group___g_a03.html#ga889cfe43f3f9c9ca92c9862261d5dbbf">  621</a></span><span class="keywordtype">void</span> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a03.html#ga889cfe43f3f9c9ca92c9862261d5dbbf">setBand</a>(uint8_t band)</div>
<div class="line"><a id="l00622" name="l00622"></a><span class="lineno">  622</span>{</div>
<div class="line"><a id="l00623" name="l00623"></a><span class="lineno">  623</span>    reg03-&gt;refined.BAND = <span class="keyword">this</span>-&gt;currentFMBand = band; <span class="comment">// Adjusted by anonimous developer</span></div>
<div class="line"><a id="l00624" name="l00624"></a><span class="lineno">  624</span>    setRegister(<a class="code hl_define" href="_r_d_a5807_8h.html#ac2446f96334b533154259a21c13950e6">REG03</a>, reg03-&gt;raw);</div>
<div class="line"><a id="l00625" name="l00625"></a><span class="lineno">  625</span>}</div>
<div class="line"><a id="l00626" name="l00626"></a><span class="lineno">  626</span> </div>
<div class="line"><a id="l00627" name="l00627"></a><span class="lineno">  627</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno">  628</span><span class="comment"> * @ingroup GA03</span></div>
<div class="line"><span class="lineno">  629</span><span class="comment"> * @brief Sets the band 3 mode: 50 to 65 MHZ or 65 to 76 MHz</span></div>
<div class="line"><span class="lineno">  630</span><span class="comment"> * @details It works only for Band 3. So if you are on band 3 (default 65 – 76 MHz East Europe) you can change the range to 50-65MHz.</span></div>
<div class="line"><span class="lineno">  631</span><span class="comment"> * @details ATTENTION: The functions setFrequencyToBeginBand and setFrequencyToEnBand do not work for 50-65MHz setup. You have to control it by yourself.</span></div>
<div class="line"><span class="lineno">  632</span><span class="comment"> * @details ATTENTION: Also, you must control the band limits from 50 to 65 MHz. The setFrequencyUp and setFrequencyDown do not work properly.</span></div>
<div class="line"><span class="lineno">  633</span><span class="comment"> * @param band3Mode if 1, 65 – 76 MHz;  if 0, 50-65MHz</span></div>
<div class="line"><span class="lineno">  634</span><span class="comment"> */</span></div>
<div class="line"><a id="l00635" name="l00635"></a><span class="lineno"><a class="line" href="group___g_a03.html#ga13f6c6e974c768a9456c049645434ca1">  635</a></span><span class="keywordtype">void</span> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a03.html#ga13f6c6e974c768a9456c049645434ca1">setBand3_50_65_Mode</a>(uint8_t band3Mode)</div>
<div class="line"><a id="l00636" name="l00636"></a><span class="lineno">  636</span>{</div>
<div class="line"><a id="l00637" name="l00637"></a><span class="lineno">  637</span>    <span class="keywordflow">if</span> (<span class="keyword">this</span>-&gt;currentFMBand != 3)</div>
<div class="line"><a id="l00638" name="l00638"></a><span class="lineno">  638</span>        <span class="keywordflow">return</span>; <span class="comment">// Do not do anything if the current band is not 3</span></div>
<div class="line"><a id="l00639" name="l00639"></a><span class="lineno">  639</span>    reg07-&gt;refined.MODE_50_60 = band3Mode;</div>
<div class="line"><a id="l00640" name="l00640"></a><span class="lineno">  640</span>    setRegister(<a class="code hl_define" href="_r_d_a5807_8h.html#a2a41df49654ae321f569bfabfa74de24">REG07</a>, reg07-&gt;raw);</div>
<div class="line"><a id="l00641" name="l00641"></a><span class="lineno">  641</span>}</div>
<div class="line"><a id="l00642" name="l00642"></a><span class="lineno">  642</span> </div>
<div class="line"><a id="l00643" name="l00643"></a><span class="lineno">  643</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno">  644</span><span class="comment"> * @ingroup GA03</span></div>
<div class="line"><span class="lineno">  645</span><span class="comment"> * @brief Gets the status of the Band3</span></div>
<div class="line"><span class="lineno">  646</span><span class="comment"> * @details Gets the status of the Band3</span></div>
<div class="line"><span class="lineno">  647</span><span class="comment"> * @return 1 if setup is 65 to 76 MHz; 0 if setup is 50 to 65 MHz</span></div>
<div class="line"><span class="lineno">  648</span><span class="comment"> */</span></div>
<div class="line"><a id="l00649" name="l00649"></a><span class="lineno"><a class="line" href="group___g_a03.html#gaea595cf077e2a709bf927deddf8a63ba">  649</a></span><a class="code hl_function" href="group___g_a03.html#gaea595cf077e2a709bf927deddf8a63ba">uint8_t</a> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a03.html#gaea595cf077e2a709bf927deddf8a63ba">getBand3Status</a>()</div>
<div class="line"><a id="l00650" name="l00650"></a><span class="lineno">  650</span>{</div>
<div class="line"><a id="l00651" name="l00651"></a><span class="lineno">  651</span>    rda_reg07 tmp;</div>
<div class="line"><a id="l00652" name="l00652"></a><span class="lineno">  652</span>    tmp.raw = getDirectRegister(0x07).raw;</div>
<div class="line"><a id="l00653" name="l00653"></a><span class="lineno">  653</span>    <span class="keywordflow">return</span> tmp.refined.MODE_50_60;</div>
<div class="line"><a id="l00654" name="l00654"></a><span class="lineno">  654</span>}</div>
<div class="line"><a id="l00655" name="l00655"></a><span class="lineno">  655</span> </div>
<div class="line"><a id="l00656" name="l00656"></a><span class="lineno">  656</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno">  657</span><span class="comment"> * @ingroup GA03</span></div>
<div class="line"><span class="lineno">  658</span><span class="comment"> * @brief Sets the FM channel space. </span></div>
<div class="line"><span class="lineno">  659</span><span class="comment"> * @details You can define the frequency step in kHz (see table below)</span></div>
<div class="line"><span class="lineno">  660</span><span class="comment"> * </span></div>
<div class="line"><span class="lineno">  661</span><span class="comment"> * Channel space table</span></div>
<div class="line"><span class="lineno">  662</span><span class="comment"> * </span></div>
<div class="line"><span class="lineno">  663</span><span class="comment"> * | Value | Decimal | Description                 |</span></div>
<div class="line"><span class="lineno">  664</span><span class="comment"> * | ----- | ------- | --------------------------- |</span></div>
<div class="line"><span class="lineno">  665</span><span class="comment"> * | 00    |    0    | 100KHz      |</span></div>
<div class="line"><span class="lineno">  666</span><span class="comment"> * | 01    |    1    | 200KHz      |</span></div>
<div class="line"><span class="lineno">  667</span><span class="comment"> * | 10    |    2    | 50KHz       |</span></div>
<div class="line"><span class="lineno">  668</span><span class="comment"> * | 11    |    3    | 25KHz       |</span></div>
<div class="line"><span class="lineno">  669</span><span class="comment"> *</span></div>
<div class="line"><span class="lineno">  670</span><span class="comment"> * @code {.cpp}</span></div>
<div class="line"><span class="lineno">  671</span><span class="comment"> * #include &lt;RDA5807.h&gt;</span></div>
<div class="line"><span class="lineno">  672</span><span class="comment"> * RDA5807 rx;</span></div>
<div class="line"><span class="lineno">  673</span><span class="comment"> * void setup() {</span></div>
<div class="line"><span class="lineno">  674</span><span class="comment"> *  pinMode(4, INPUT_PULLUP); // Arduino pin 4 - Frequency Up</span></div>
<div class="line"><span class="lineno">  675</span><span class="comment"> *  pinMode(5, INPUT_PULLUP); // Arduino pin 5 - Frequency Down</span></div>
<div class="line"><span class="lineno">  676</span><span class="comment"> *  rx.setup();</span></div>
<div class="line"><span class="lineno">  677</span><span class="comment"> *  rx.setBandSpace(2); // 50 kHz Step</span></div>
<div class="line"><span class="lineno">  678</span><span class="comment"> *  rx.setFrequency(10390); // Tunes at 103.9 MHz</span></div>
<div class="line"><span class="lineno">  679</span><span class="comment"> * }</span></div>
<div class="line"><span class="lineno">  680</span><span class="comment"> * void loop() {</span></div>
<div class="line"><span class="lineno">  681</span><span class="comment"> *  if (digitalRead(4) == LOW) rx.setFrequencyUp();   // Up 50 kHz</span></div>
<div class="line"><span class="lineno">  682</span><span class="comment"> *  if (digitalRead(5) == LOW) rx.setFrequencyDown(); // Down 50 kHz</span></div>
<div class="line"><span class="lineno">  683</span><span class="comment"> *  delay(200);</span></div>
<div class="line"><span class="lineno">  684</span><span class="comment"> * }</span></div>
<div class="line"><span class="lineno">  685</span><span class="comment"> * @endcode</span></div>
<div class="line"><span class="lineno">  686</span><span class="comment"> *</span></div>
<div class="line"><span class="lineno">  687</span><span class="comment"> * @param space FM channel space. See table above.</span></div>
<div class="line"><span class="lineno">  688</span><span class="comment"> * @todo make the space 01 (200kHz) work.</span></div>
<div class="line"><span class="lineno">  689</span><span class="comment"> * @see setStep</span></div>
<div class="line"><span class="lineno">  690</span><span class="comment"> */</span></div>
<div class="line"><a id="l00691" name="l00691"></a><span class="lineno"><a class="line" href="group___g_a03.html#ga76f6c3400b038aef15ba7318592e1dd0">  691</a></span><span class="keywordtype">void</span> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a03.html#ga76f6c3400b038aef15ba7318592e1dd0">setSpace</a>(uint8_t space)</div>
<div class="line"><a id="l00692" name="l00692"></a><span class="lineno">  692</span>{</div>
<div class="line"><a id="l00693" name="l00693"></a><span class="lineno">  693</span>    reg03-&gt;refined.SPACE = space;</div>
<div class="line"><a id="l00694" name="l00694"></a><span class="lineno">  694</span>    <span class="keyword">this</span>-&gt;currentFMSpace = space;</div>
<div class="line"><a id="l00695" name="l00695"></a><span class="lineno">  695</span>    setRegister(<a class="code hl_define" href="_r_d_a5807_8h.html#ac2446f96334b533154259a21c13950e6">REG03</a>, reg03-&gt;raw);</div>
<div class="line"><a id="l00696" name="l00696"></a><span class="lineno">  696</span>}</div>
<div class="line"><a id="l00697" name="l00697"></a><span class="lineno">  697</span> </div>
<div class="line"><a id="l00698" name="l00698"></a><span class="lineno">  698</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno">  699</span><span class="comment"> * @ingroup GA03 - Frequency step</span></div>
<div class="line"><span class="lineno">  700</span><span class="comment"> * @brief Sets the FM Step;</span></div>
<div class="line"><span class="lineno">  701</span><span class="comment"> * @details Converts the step frequency (25, 50, 100 or 200 kHz) to Space. Invalid values will be converted to 0 (100 kHz)</span></div>
<div class="line"><span class="lineno">  702</span><span class="comment"> * @param step  25, 50, 100 or 200 kHz</span></div>
<div class="line"><span class="lineno">  703</span><span class="comment"> * @todo Make the step 200kHz work well</span></div>
<div class="line"><span class="lineno">  704</span><span class="comment"> */</span></div>
<div class="line"><a id="l00705" name="l00705"></a><span class="lineno"><a class="line" href="group___g_a03.html#ga8bbf57aaeb92f226179579efa61cc846">  705</a></span><span class="keywordtype">void</span> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a03.html#ga8bbf57aaeb92f226179579efa61cc846">setStep</a>(uint8_t step)</div>
<div class="line"><a id="l00706" name="l00706"></a><span class="lineno">  706</span>{</div>
<div class="line"><a id="l00707" name="l00707"></a><span class="lineno">  707</span>    uint8_t space;</div>
<div class="line"><a id="l00708" name="l00708"></a><span class="lineno">  708</span>    <span class="keywordflow">switch</span> (step)</div>
<div class="line"><a id="l00709" name="l00709"></a><span class="lineno">  709</span>    {</div>
<div class="line"><a id="l00710" name="l00710"></a><span class="lineno">  710</span>    <span class="keywordflow">case</span> 100:</div>
<div class="line"><a id="l00711" name="l00711"></a><span class="lineno">  711</span>        space = 0; <span class="comment">// b00</span></div>
<div class="line"><a id="l00712" name="l00712"></a><span class="lineno">  712</span>        <span class="keywordflow">break</span>;</div>
<div class="line"><a id="l00713" name="l00713"></a><span class="lineno">  713</span>    <span class="keywordflow">case</span> 200:</div>
<div class="line"><a id="l00714" name="l00714"></a><span class="lineno">  714</span>        space = 1; <span class="comment">// b01</span></div>
<div class="line"><a id="l00715" name="l00715"></a><span class="lineno">  715</span>        <span class="keywordflow">break</span>;</div>
<div class="line"><a id="l00716" name="l00716"></a><span class="lineno">  716</span>    <span class="keywordflow">case</span> 50:</div>
<div class="line"><a id="l00717" name="l00717"></a><span class="lineno">  717</span>        space = 2; <span class="comment">// b10</span></div>
<div class="line"><a id="l00718" name="l00718"></a><span class="lineno">  718</span>        <span class="keywordflow">break</span>;</div>
<div class="line"><a id="l00719" name="l00719"></a><span class="lineno">  719</span>    <span class="keywordflow">case</span> 25:</div>
<div class="line"><a id="l00720" name="l00720"></a><span class="lineno">  720</span>        space = 3; <span class="comment">// b11</span></div>
<div class="line"><a id="l00721" name="l00721"></a><span class="lineno">  721</span>        <span class="keywordflow">break</span>;</div>
<div class="line"><a id="l00722" name="l00722"></a><span class="lineno">  722</span>    <span class="keywordflow">default</span>:</div>
<div class="line"><a id="l00723" name="l00723"></a><span class="lineno">  723</span>        space = 0;</div>
<div class="line"><a id="l00724" name="l00724"></a><span class="lineno">  724</span>    }</div>
<div class="line"><a id="l00725" name="l00725"></a><span class="lineno">  725</span>    <span class="keyword">this</span>-&gt;setSpace(space);</div>
<div class="line"><a id="l00726" name="l00726"></a><span class="lineno">  726</span>}</div>
<div class="line"><a id="l00727" name="l00727"></a><span class="lineno">  727</span> </div>
<div class="line"><a id="l00728" name="l00728"></a><span class="lineno">  728</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno">  729</span><span class="comment"> * @ingroup GA03</span></div>
<div class="line"><span class="lineno">  730</span><span class="comment"> * @brief Sets De-emphasis.</span></div>
<div class="line"><span class="lineno">  731</span><span class="comment"> * @details Default is 75 μs (used in USA); 50 μs is used in Europe, Australia, Japan.</span></div>
<div class="line"><span class="lineno">  732</span><span class="comment"> * @code {.cpp}</span></div>
<div class="line"><span class="lineno">  733</span><span class="comment"> * #include &lt;RDA5807.h&gt;</span></div>
<div class="line"><span class="lineno">  734</span><span class="comment"> * RDA5807 rx;</span></div>
<div class="line"><span class="lineno">  735</span><span class="comment"> * void setup() {</span></div>
<div class="line"><span class="lineno">  736</span><span class="comment"> *  rx.setup();</span></div>
<div class="line"><span class="lineno">  737</span><span class="comment"> *  rx.setFrequency(10390); // Tunes at 103.9 MHz</span></div>
<div class="line"><span class="lineno">  738</span><span class="comment"> *  rx.setFmDeemphasis(1); // Sets to 50 μs. Used in Europe, Australia, Japan.</span></div>
<div class="line"><span class="lineno">  739</span><span class="comment"> * }</span></div>
<div class="line"><span class="lineno">  740</span><span class="comment"> * void loop() {</span></div>
<div class="line"><span class="lineno">  741</span><span class="comment"> * }</span></div>
<div class="line"><span class="lineno">  742</span><span class="comment"> * @endcode</span></div>
<div class="line"><span class="lineno">  743</span><span class="comment"> * </span></div>
<div class="line"><span class="lineno">  744</span><span class="comment"> * @param de  0 = 75 μs; 1 = 50 μs</span></div>
<div class="line"><span class="lineno">  745</span><span class="comment"> */</span></div>
<div class="line"><a id="l00746" name="l00746"></a><span class="lineno"><a class="line" href="group___g_a03.html#ga4f8fe00a561c39d2dc9a0a143b1866e9">  746</a></span><span class="keywordtype">void</span> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a03.html#ga4f8fe00a561c39d2dc9a0a143b1866e9">setFmDeemphasis</a>(uint8_t de)</div>
<div class="line"><a id="l00747" name="l00747"></a><span class="lineno">  747</span>{</div>
<div class="line"><a id="l00748" name="l00748"></a><span class="lineno">  748</span>    reg04-&gt;refined.DE = de;</div>
<div class="line"><a id="l00749" name="l00749"></a><span class="lineno">  749</span>    setRegister(<a class="code hl_define" href="_r_d_a5807_8h.html#a88dee04c27a51e335798ab012dccbea1">REG04</a>, reg04-&gt;raw);</div>
<div class="line"><a id="l00750" name="l00750"></a><span class="lineno">  750</span>}</div>
<div class="line"><a id="l00751" name="l00751"></a><span class="lineno">  751</span> </div>
<div class="line"><a id="l00752" name="l00752"></a><span class="lineno">  752</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno">  753</span><span class="comment"> * @defgroup GA04 RDS Functions</span></div>
<div class="line"><span class="lineno">  754</span><span class="comment"> * @section GA04 RDS/RBDS</span></div>
<div class="line"><span class="lineno">  755</span><span class="comment"> * @details Is important to mention that almost all the essential methods required to implement RDS are already implemented here.</span></div>
<div class="line"><span class="lineno">  756</span><span class="comment"> * @details Begin working with RDS, simply invoke the setRDS or setRBDS methods.</span></div>
<div class="line"><span class="lineno">  757</span><span class="comment"> * @details Querying a set of RDS information, please ensure to call getRdsReady before.</span></div>
<div class="line"><span class="lineno">  758</span><span class="comment"> */</span></div>
<div class="line"><a id="l00759" name="l00759"></a><span class="lineno">  759</span> </div>
<div class="line"><a id="l00760" name="l00760"></a><span class="lineno">  760</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno">  761</span><span class="comment"> * @ingroup GA04</span></div>
<div class="line"><span class="lineno">  762</span><span class="comment"> * @brief Sets the RDS operation</span></div>
<div class="line"><span class="lineno">  763</span><span class="comment"> * @details Enable or Disable the RDS</span></div>
<div class="line"><span class="lineno">  764</span><span class="comment"> * @details You must call this function before stating deal with RDS.   </span></div>
<div class="line"><span class="lineno">  765</span><span class="comment"> * @code {.cpp}</span></div>
<div class="line"><span class="lineno">  766</span><span class="comment"> * #include &lt;RDA5807.h&gt; </span></div>
<div class="line"><span class="lineno">  767</span><span class="comment"> * RDA5807 rx; </span></div>
<div class="line"><span class="lineno">  768</span><span class="comment"> * void setup()</span></div>
<div class="line"><span class="lineno">  769</span><span class="comment"> *   rx.setup(); // Starts the receiver with default parameters</span></div>
<div class="line"><span class="lineno">  770</span><span class="comment"> *   rx.setRDS(true);</span></div>
<div class="line"><span class="lineno">  771</span><span class="comment"> *   rx.setRdsFifo(true);</span></div>
<div class="line"><span class="lineno">  772</span><span class="comment"> *   rx.setFrequency(10390); // Station with RDS service</span></div>
<div class="line"><span class="lineno">  773</span><span class="comment"> * }</span></div>
<div class="line"><span class="lineno">  774</span><span class="comment"> * @endcode</span></div>
<div class="line"><span class="lineno">  775</span><span class="comment"> * @param true = turns the RDS ON; false  = turns the RDS OFF</span></div>
<div class="line"><span class="lineno">  776</span><span class="comment"> * @see setRdsFifo</span></div>
<div class="line"><span class="lineno">  777</span><span class="comment"> */</span></div>
<div class="line"><a id="l00778" name="l00778"></a><span class="lineno"><a class="line" href="group___g_a04.html#ga4b741f1433eda57949bb40fa9e973732">  778</a></span><span class="keywordtype">void</span> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a04.html#ga4b741f1433eda57949bb40fa9e973732">setRDS</a>(<span class="keywordtype">bool</span> value)</div>
<div class="line"><a id="l00779" name="l00779"></a><span class="lineno">  779</span>{</div>
<div class="line"><a id="l00780" name="l00780"></a><span class="lineno">  780</span>    <span class="keyword">this</span>-&gt;oldTextABFlag = reg02-&gt;refined.SEEK = 0;</div>
<div class="line"><a id="l00781" name="l00781"></a><span class="lineno">  781</span>    reg02-&gt;refined.RDS_EN = value;</div>
<div class="line"><a id="l00782" name="l00782"></a><span class="lineno">  782</span>    setRegister(<a class="code hl_define" href="_r_d_a5807_8h.html#a09a3d3fef9f53f0dbe1dd0072f02c1d4">REG02</a>, reg02-&gt;raw);</div>
<div class="line"><a id="l00783" name="l00783"></a><span class="lineno">  783</span>}</div>
<div class="line"><a id="l00784" name="l00784"></a><span class="lineno">  784</span> </div>
<div class="line"><a id="l00785" name="l00785"></a><span class="lineno">  785</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno">  786</span><span class="comment"> * @ingroup GA04</span></div>
<div class="line"><span class="lineno">  787</span><span class="comment"> * @brief Sets the RBDS operation</span></div>
<div class="line"><span class="lineno">  788</span><span class="comment"> * @details Enable or Disable the RDS</span></div>
<div class="line"><span class="lineno">  789</span><span class="comment"> *</span></div>
<div class="line"><span class="lineno">  790</span><span class="comment"> * @param true = turns the RBDS ON; false  = turns the RBDS OFF</span></div>
<div class="line"><span class="lineno">  791</span><span class="comment"> */</span></div>
<div class="line"><a id="l00792" name="l00792"></a><span class="lineno"><a class="line" href="group___g_a04.html#gaecbab42ef08c486b2eb1ab25649c921a">  792</a></span><span class="keywordtype">void</span> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a04.html#gaecbab42ef08c486b2eb1ab25649c921a">setRBDS</a>(<span class="keywordtype">bool</span> value)</div>
<div class="line"><a id="l00793" name="l00793"></a><span class="lineno">  793</span>{</div>
<div class="line"><a id="l00794" name="l00794"></a><span class="lineno">  794</span>    <span class="keyword">this</span>-&gt;oldTextABFlag = reg02-&gt;refined.SEEK = 0;</div>
<div class="line"><a id="l00795" name="l00795"></a><span class="lineno">  795</span>    reg02-&gt;refined.RDS_EN = 1;</div>
<div class="line"><a id="l00796" name="l00796"></a><span class="lineno">  796</span>    setRegister(<a class="code hl_define" href="_r_d_a5807_8h.html#a09a3d3fef9f53f0dbe1dd0072f02c1d4">REG02</a>, reg02-&gt;raw);</div>
<div class="line"><a id="l00797" name="l00797"></a><span class="lineno">  797</span>    reg04-&gt;refined.RBDS = value;</div>
<div class="line"><a id="l00798" name="l00798"></a><span class="lineno">  798</span>    setRegister(<a class="code hl_define" href="_r_d_a5807_8h.html#a88dee04c27a51e335798ab012dccbea1">REG04</a>, reg04-&gt;raw);</div>
<div class="line"><a id="l00799" name="l00799"></a><span class="lineno">  799</span>}</div>
<div class="line"><a id="l00800" name="l00800"></a><span class="lineno">  800</span> </div>
<div class="line"><a id="l00801" name="l00801"></a><span class="lineno">  801</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno">  802</span><span class="comment"> * @ingroup GA04</span></div>
<div class="line"><span class="lineno">  803</span><span class="comment"> * @brief Returns true if RDS Ready</span></div>
<div class="line"><span class="lineno">  804</span><span class="comment"> * @details Read address 0Ah and check the bit RDSR.</span></div>
<div class="line"><span class="lineno">  805</span><span class="comment"> * @details When using the polling method, it is best not to poll continuously. The data will appear in intervals.</span></div>
<div class="line"><span class="lineno">  806</span><span class="comment"> * @details ATTENTION: You must call this function before calling any RDS query</span></div>
<div class="line"><span class="lineno">  807</span><span class="comment"> * @code {.cpp}</span></div>
<div class="line"><span class="lineno">  808</span><span class="comment"> * if (rx.getRdsReady()) {</span></div>
<div class="line"><span class="lineno">  809</span><span class="comment"> *    if (rx.hasRdsInfo() ) {</span></div>
<div class="line"><span class="lineno">  810</span><span class="comment"> *      rdsMsg = rx.getRdsProgramInformation();</span></div>
<div class="line"><span class="lineno">  811</span><span class="comment"> *      stationName = rx.getRdsStationName();</span></div>
<div class="line"><span class="lineno">  812</span><span class="comment"> *      rdsTime = rx.getRdsTime();  // Gets the UTC Time. Check the getRdsTime documentation for more details. Some stations do not broadcast the right time.</span></div>
<div class="line"><span class="lineno">  813</span><span class="comment"> *    }</span></div>
<div class="line"><span class="lineno">  814</span><span class="comment"> * }</span></div>
<div class="line"><span class="lineno">  815</span><span class="comment"> * @endcode</span></div>
<div class="line"><span class="lineno">  816</span><span class="comment"> * </span></div>
<div class="line"><span class="lineno">  817</span><span class="comment"> * @return true or false</span></div>
<div class="line"><span class="lineno">  818</span><span class="comment"> * @see setRDS, setInterruptMode, getRdsAllData, getRdsSync, setRdsFifo</span></div>
<div class="line"><span class="lineno">  819</span><span class="comment"> * @see [2wcom - RDS BasicsRDS](https://www.2wcom.com/fileadmin/redaktion/dokumente/Company/RDS_Basics.pdf)</span></div>
<div class="line"><span class="lineno">  820</span><span class="comment"> * </span></div>
<div class="line"><span class="lineno">  821</span><span class="comment"> */</span></div>
<div class="line"><a id="l00822" name="l00822"></a><span class="lineno"><a class="line" href="group___g_a04.html#gacfa48dfcf792a9bcee489658177aed90">  822</a></span><span class="keywordtype">bool</span> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a04.html#gacfa48dfcf792a9bcee489658177aed90">getRdsReady</a>()</div>
<div class="line"><a id="l00823" name="l00823"></a><span class="lineno">  823</span>{</div>
<div class="line"><a id="l00824" name="l00824"></a><span class="lineno">  824</span>    <span class="comment">// getStatus(REG0A);</span></div>
<div class="line"><a id="l00825" name="l00825"></a><span class="lineno">  825</span>    <a class="code hl_function" href="group___g_a02.html#gab9e3a5584a6238f719e9c9e49435f5ce">getStatusRegisters</a><a class="code hl_function" href="group___g_a02.html#gab9e3a5584a6238f719e9c9e49435f5ce">(</a><a class="code hl_function" href="group___g_a02.html#gab9e3a5584a6238f719e9c9e49435f5ce">)</a>;</div>
<div class="line"><a id="l00826" name="l00826"></a><span class="lineno">  826</span> </div>
<div class="line"><a id="l00827" name="l00827"></a><span class="lineno">  827</span>    <span class="keywordflow">return</span> reg0a-&gt;refined.RDSR;</div>
<div class="line"><a id="l00828" name="l00828"></a><span class="lineno">  828</span>}</div>
<div class="line"><a id="l00829" name="l00829"></a><span class="lineno">  829</span> </div>
<div class="line"><a id="l00830" name="l00830"></a><span class="lineno">  830</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno">  831</span><span class="comment"> * @ingroup GA04</span></div>
<div class="line"><span class="lineno">  832</span><span class="comment"> * @brief Returns the current Text Flag A/B</span></div>
<div class="line"><span class="lineno">  833</span><span class="comment"> * @details ATTENTION: You must call getRdsReady before calling this function. </span></div>
<div class="line"><span class="lineno">  834</span><span class="comment"> * @return uint8_t current Text Flag A/B</span></div>
<div class="line"><span class="lineno">  835</span><span class="comment"> * @see getRdsReady</span></div>
<div class="line"><span class="lineno">  836</span><span class="comment"> */</span></div>
<div class="line"><a id="l00837" name="l00837"></a><span class="lineno"><a class="line" href="group___g_a04.html#ga04e5fe0cacbdcae620388a15630cf9c1">  837</a></span><a class="code hl_function" href="group___g_a04.html#ga04e5fe0cacbdcae620388a15630cf9c1">uint8_t</a> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a04.html#ga04e5fe0cacbdcae620388a15630cf9c1">getRdsFlagAB</a>(<span class="keywordtype">void</span>)</div>
<div class="line"><a id="l00838" name="l00838"></a><span class="lineno">  838</span>{</div>
<div class="line"><a id="l00839" name="l00839"></a><span class="lineno">  839</span>    rds_blockb blkb;</div>
<div class="line"><a id="l00840" name="l00840"></a><span class="lineno">  840</span>    blkb.blockB = reg0d-&gt;RDSB;</div>
<div class="line"><a id="l00841" name="l00841"></a><span class="lineno">  841</span>    <span class="keywordflow">return</span> blkb.refined.textABFlag;</div>
<div class="line"><a id="l00842" name="l00842"></a><span class="lineno">  842</span>}</div>
<div class="line"><a id="l00843" name="l00843"></a><span class="lineno">  843</span> </div>
<div class="line"><a id="l00844" name="l00844"></a><span class="lineno">  844</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno">  845</span><span class="comment"> * @ingroup GA04</span></div>
<div class="line"><span class="lineno">  846</span><span class="comment"> *</span></div>
<div class="line"><span class="lineno">  847</span><span class="comment"> * @brief Returns true if the Text Flag A/B  has changed</span></div>
<div class="line"><span class="lineno">  848</span><span class="comment"> * @details This function returns true if a new FlagAB has chenged. Also it clears the Station Name buffer in that condition.</span></div>
<div class="line"><span class="lineno">  849</span><span class="comment"> * @details It is useful to check and show the RDS Text in your application.</span></div>
<div class="line"><span class="lineno">  850</span><span class="comment"> * @details You must call getRdsReady before calling this function.</span></div>
<div class="line"><span class="lineno">  851</span><span class="comment"> * </span></div>
<div class="line"><span class="lineno">  852</span><span class="comment"> * @return True or false</span></div>
<div class="line"><span class="lineno">  853</span><span class="comment"> */</span></div>
<div class="line"><a id="l00854" name="l00854"></a><span class="lineno"><a class="line" href="group___g_a04.html#gad602518e28efa9abb8319f1f25480551">  854</a></span><span class="keywordtype">bool</span> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a04.html#gad602518e28efa9abb8319f1f25480551">isNewRdsFlagAB</a>(<span class="keywordtype">void</span>)</div>
<div class="line"><a id="l00855" name="l00855"></a><span class="lineno">  855</span>{</div>
<div class="line"><a id="l00856" name="l00856"></a><span class="lineno">  856</span>    rds_blockb blkb;</div>
<div class="line"><a id="l00857" name="l00857"></a><span class="lineno">  857</span>    blkb.blockB = reg0d-&gt;RDSB;</div>
<div class="line"><a id="l00858" name="l00858"></a><span class="lineno">  858</span>    <span class="keywordflow">if</span> (blkb.refined.textABFlag != <span class="keyword">this</span>-&gt;oldTextABFlag)</div>
<div class="line"><a id="l00859" name="l00859"></a><span class="lineno">  859</span>    {</div>
<div class="line"><a id="l00860" name="l00860"></a><span class="lineno">  860</span>        <span class="keyword">this</span>-&gt;oldTextABFlag = blkb.refined.textABFlag; <span class="comment">// saves the latest value</span></div>
<div class="line"><a id="l00861" name="l00861"></a><span class="lineno">  861</span>        memset(<a class="code hl_variable" href="group___g_a01.html#a01973fd833000d82609206bfbef62977">rds_buffer0A</a>, 0, <span class="keyword">sizeof</span>(<a class="code hl_variable" href="group___g_a01.html#a01973fd833000d82609206bfbef62977">rds_buffer0A</a>));</div>
<div class="line"><a id="l00862" name="l00862"></a><span class="lineno">  862</span> </div>
<div class="line"><a id="l00863" name="l00863"></a><span class="lineno">  863</span>        <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a id="l00864" name="l00864"></a><span class="lineno">  864</span>    }</div>
<div class="line"><a id="l00865" name="l00865"></a><span class="lineno">  865</span>    <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a id="l00866" name="l00866"></a><span class="lineno">  866</span>}</div>
<div class="line"><a id="l00867" name="l00867"></a><span class="lineno">  867</span> </div>
<div class="line"><a id="l00868" name="l00868"></a><span class="lineno">  868</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno">  869</span><span class="comment"> * @ingroup GA04</span></div>
<div class="line"><span class="lineno">  870</span><span class="comment"> * @brief Gets Station Name, Station Information, Program Information and utcTime</span></div>
<div class="line"><span class="lineno">  871</span><span class="comment"> * @details This function populates four char pointer variable parameters with Station Name, Station Information, Programa Information and UTC time.</span></div>
<div class="line"><span class="lineno">  872</span><span class="comment"> * @details You must call  setRDS(true), setRdsFifo(true) before calling getRdsAllData(...) </span></div>
<div class="line"><span class="lineno">  873</span><span class="comment"> * @details ATTENTION: the parameters below are point to point to array of char. </span></div>
<div class="line"><span class="lineno">  874</span><span class="comment"> * @details the right way to call this function is shown below.</span></div>
<div class="line"><span class="lineno">  875</span><span class="comment"> * @code {.cpp}</span></div>
<div class="line"><span class="lineno">  876</span><span class="comment"> * </span></div>
<div class="line"><span class="lineno">  877</span><span class="comment"> * char *stationName, *stationInfo, *programInfo, *rdsTime;</span></div>
<div class="line"><span class="lineno">  878</span><span class="comment"> * // The char pointers above will be populate by the call below. So, the char pointers need to be passed by reference (pointer to pointer).</span></div>
<div class="line"><span class="lineno">  879</span><span class="comment"> * if (rx.getRdsAllData(&amp;stationName, &amp;stationInfo , &amp;programInfo, &amp;rdsTime) ) {</span></div>
<div class="line"><span class="lineno">  880</span><span class="comment"> *     showProgramaInfo(programInfo);  </span></div>
<div class="line"><span class="lineno">  881</span><span class="comment"> *     showStationName(stationName); </span></div>
<div class="line"><span class="lineno">  882</span><span class="comment"> *     showStationInfo(stationInfo);</span></div>
<div class="line"><span class="lineno">  883</span><span class="comment"> *     showUtcTime(rdsTime); </span></div>
<div class="line"><span class="lineno">  884</span><span class="comment"> * }</span></div>
<div class="line"><span class="lineno">  885</span><span class="comment"> * @endcode</span></div>
<div class="line"><span class="lineno">  886</span><span class="comment"> * @param stationName (reference)  - if NOT NULL,  point to Name of the Station (char array -  9 bytes)</span></div>
<div class="line"><span class="lineno">  887</span><span class="comment"> * @param stationInformation (reference)  - if NOT NULL, point to Station information (char array - 33 bytes)</span></div>
<div class="line"><span class="lineno">  888</span><span class="comment"> * @param programInformation (reference)  - if NOT NULL, point to program information (char array - 65 nytes)</span></div>
<div class="line"><span class="lineno">  889</span><span class="comment"> * @param utcTime  (reference)  - if NOT NULL, point to char array containing the current UTC time (format HH:MM:SS +HH:MM)</span></div>
<div class="line"><span class="lineno">  890</span><span class="comment"> * @return True if found at least one valid data </span></div>
<div class="line"><span class="lineno">  891</span><span class="comment"> * @see setRDS, setRdsFifo, getRdsAllData</span></div>
<div class="line"><span class="lineno">  892</span><span class="comment"> */</span></div>
<div class="line"><a id="l00893" name="l00893"></a><span class="lineno"><a class="line" href="group___g_a04.html#gadafba5991f6f60a52ad73fdda8fac984">  893</a></span><span class="keywordtype">bool</span> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a04.html#gadafba5991f6f60a52ad73fdda8fac984">getRdsAllData</a>(<span class="keywordtype">char</span> **stationName, <span class="keywordtype">char</span> **stationInformation, <span class="keywordtype">char</span> **programInformation, <span class="keywordtype">char</span> **utcTime) {</div>
<div class="line"><a id="l00894" name="l00894"></a><span class="lineno">  894</span> </div>
<div class="line"><a id="l00895" name="l00895"></a><span class="lineno">  895</span>    <span class="keywordflow">if</span> ( !<span class="keyword">this</span><a class="code hl_function" href="group___g_a04.html#gacfa48dfcf792a9bcee489658177aed90">-&gt;</a><a class="code hl_function" href="group___g_a04.html#gacfa48dfcf792a9bcee489658177aed90">getRdsReady</a><a class="code hl_function" href="group___g_a04.html#gacfa48dfcf792a9bcee489658177aed90">(</a><a class="code hl_function" href="group___g_a04.html#gacfa48dfcf792a9bcee489658177aed90">)</a> ) <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a id="l00896" name="l00896"></a><span class="lineno">  896</span>    <span class="keywordflow">if</span> ( !<span class="keyword">this</span><a class="code hl_function" href="group___g_a04.html#gac6b8c39c1134700ce3e2a9e5216a5325">-&gt;</a><a class="code hl_function" href="group___g_a04.html#gac6b8c39c1134700ce3e2a9e5216a5325">hasRdsInfoAB</a><a class="code hl_function" href="group___g_a04.html#gac6b8c39c1134700ce3e2a9e5216a5325">(</a><a class="code hl_function" href="group___g_a04.html#gac6b8c39c1134700ce3e2a9e5216a5325">)</a> ) <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a id="l00897" name="l00897"></a><span class="lineno">  897</span>    *stationName = <span class="keyword">this</span><a class="code hl_function" href="group___g_a04.html#ga5a26789f1910a5b2098919dbd50e6a3c">-&gt;</a><a class="code hl_function" href="group___g_a04.html#ga5a26789f1910a5b2098919dbd50e6a3c">getRdsText0A</a><a class="code hl_function" href="group___g_a04.html#ga5a26789f1910a5b2098919dbd50e6a3c">(</a><a class="code hl_function" href="group___g_a04.html#ga5a26789f1910a5b2098919dbd50e6a3c">)</a>; <span class="comment">// returns NULL if no information</span></div>
<div class="line"><a id="l00898" name="l00898"></a><span class="lineno">  898</span>    *stationInformation = <span class="keyword">this</span><a class="code hl_function" href="group___g_a04.html#gacd6614bc7be99d55a3d9a17739ee7074">-&gt;</a><a class="code hl_function" href="group___g_a04.html#gacd6614bc7be99d55a3d9a17739ee7074">getRdsText2B</a><a class="code hl_function" href="group___g_a04.html#gacd6614bc7be99d55a3d9a17739ee7074">(</a><a class="code hl_function" href="group___g_a04.html#gacd6614bc7be99d55a3d9a17739ee7074">)</a>; <span class="comment">// returns NULL if no information</span></div>
<div class="line"><a id="l00899" name="l00899"></a><span class="lineno">  899</span>    *programInformation = <span class="keyword">this</span><a class="code hl_function" href="group___g_a04.html#ga482098a64299cb8af976d4d10a460212">-&gt;</a><a class="code hl_function" href="group___g_a04.html#ga482098a64299cb8af976d4d10a460212">getRdsText2A</a><a class="code hl_function" href="group___g_a04.html#ga482098a64299cb8af976d4d10a460212">(</a><a class="code hl_function" href="group___g_a04.html#ga482098a64299cb8af976d4d10a460212">)</a>; <span class="comment">// returns NULL if no information</span></div>
<div class="line"><a id="l00900" name="l00900"></a><span class="lineno">  900</span>    *utcTime = <span class="keyword">this</span><a class="code hl_function" href="group___g_a04.html#gaef398d848e7378ec4897965b8e1b4441">-&gt;</a><a class="code hl_function" href="group___g_a04.html#gaef398d848e7378ec4897965b8e1b4441">getRdsTime</a><a class="code hl_function" href="group___g_a04.html#gaef398d848e7378ec4897965b8e1b4441">(</a><a class="code hl_function" href="group___g_a04.html#gaef398d848e7378ec4897965b8e1b4441">)</a>; <span class="comment">// returns NULL if no information</span></div>
<div class="line"><a id="l00901" name="l00901"></a><span class="lineno">  901</span> </div>
<div class="line"><a id="l00902" name="l00902"></a><span class="lineno">  902</span>    <span class="keywordflow">return</span> (<span class="keywordtype">bool</span>)stationName | (<span class="keywordtype">bool</span>)stationInformation | (<span class="keywordtype">bool</span>) programInformation | (<span class="keywordtype">bool</span>) utcTime;</div>
<div class="line"><a id="l00903" name="l00903"></a><span class="lineno">  903</span>}</div>
<div class="line"><a id="l00904" name="l00904"></a><span class="lineno">  904</span> </div>
<div class="line"><a id="l00905" name="l00905"></a><span class="lineno">  905</span> </div>
<div class="line"><a id="l00906" name="l00906"></a><span class="lineno">  906</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno">  907</span><span class="comment"> * @ingroup GA04</span></div>
<div class="line"><span class="lineno">  908</span><span class="comment"> * @brief Return the group type</span></div>
<div class="line"><span class="lineno">  909</span><span class="comment"> * @details ATTENTION: You must call getRdsReady before calling this function. </span></div>
<div class="line"><span class="lineno">  910</span><span class="comment"> * @return uint16_t</span></div>
<div class="line"><span class="lineno">  911</span><span class="comment"> * @see getRdsReady</span></div>
<div class="line"><span class="lineno">  912</span><span class="comment"> */</span></div>
<div class="line"><a id="l00913" name="l00913"></a><span class="lineno"><a class="line" href="group___g_a04.html#ga32c361b9b996a5920519315aa86d174d">  913</a></span><a class="code hl_function" href="group___g_a04.html#ga32c361b9b996a5920519315aa86d174d">uint16_t</a> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a04.html#ga32c361b9b996a5920519315aa86d174d">getRdsGroupType</a>()</div>
<div class="line"><a id="l00914" name="l00914"></a><span class="lineno">  914</span>{</div>
<div class="line"><a id="l00915" name="l00915"></a><span class="lineno">  915</span>    rds_blockb blkb;</div>
<div class="line"><a id="l00916" name="l00916"></a><span class="lineno">  916</span>    blkb.blockB = reg0d-&gt;RDSB;</div>
<div class="line"><a id="l00917" name="l00917"></a><span class="lineno">  917</span>    <span class="keywordflow">return</span> blkb.group0.groupType;</div>
<div class="line"><a id="l00918" name="l00918"></a><span class="lineno">  918</span>}</div>
<div class="line"><a id="l00919" name="l00919"></a><span class="lineno">  919</span> </div>
<div class="line"><a id="l00920" name="l00920"></a><span class="lineno">  920</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno">  921</span><span class="comment"> * @ingroup GA04</span></div>
<div class="line"><span class="lineno">  922</span><span class="comment"> * @brief Gets the version code (extracted from the Block B)</span></div>
<div class="line"><span class="lineno">  923</span><span class="comment"> * @details ATTENTION: You must call getRdsReady before calling this function. </span></div>
<div class="line"><span class="lineno">  924</span><span class="comment"> * @returns  0=A or 1=B</span></div>
<div class="line"><span class="lineno">  925</span><span class="comment"> * @see getRdsReady</span></div>
<div class="line"><span class="lineno">  926</span><span class="comment"> */</span></div>
<div class="line"><a id="l00927" name="l00927"></a><span class="lineno"><a class="line" href="group___g_a04.html#gad85ccedd8baecd8bc2f42325a3ee8741">  927</a></span><a class="code hl_function" href="group___g_a04.html#gad85ccedd8baecd8bc2f42325a3ee8741">uint8_t</a> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a04.html#gad85ccedd8baecd8bc2f42325a3ee8741">getRdsVersionCode</a>(<span class="keywordtype">void</span>)</div>
<div class="line"><a id="l00928" name="l00928"></a><span class="lineno">  928</span>{</div>
<div class="line"><a id="l00929" name="l00929"></a><span class="lineno">  929</span>    rds_blockb blkb;</div>
<div class="line"><a id="l00930" name="l00930"></a><span class="lineno">  930</span>    blkb.blockB = reg0d-&gt;RDSB;</div>
<div class="line"><a id="l00931" name="l00931"></a><span class="lineno">  931</span>    <span class="keywordflow">return</span> blkb.refined.versionCode;</div>
<div class="line"><a id="l00932" name="l00932"></a><span class="lineno">  932</span>}</div>
<div class="line"><a id="l00933" name="l00933"></a><span class="lineno">  933</span> </div>
<div class="line"><a id="l00934" name="l00934"></a><span class="lineno">  934</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno">  935</span><span class="comment"> * @ingroup GA04</span></div>
<div class="line"><span class="lineno">  936</span><span class="comment"> * @brief Returns the Program Type (extracted from the Block B)</span></div>
<div class="line"><span class="lineno">  937</span><span class="comment"> * @details ATTENTION: You must call getRdsReady before calling this function. </span></div>
<div class="line"><span class="lineno">  938</span><span class="comment"> * @see https://en.wikipedia.org/wiki/Radio_Data_System</span></div>
<div class="line"><span class="lineno">  939</span><span class="comment"> * @see [2wcom RDS Basics](https://www.2wcom.com/fileadmin/redaktion/dokumente/Company/RDS_Basics.pdf)</span></div>
<div class="line"><span class="lineno">  940</span><span class="comment"> * @see getRdsReady</span></div>
<div class="line"><span class="lineno">  941</span><span class="comment"> * @return program type (an integer betwenn 0 and 31)</span></div>
<div class="line"><span class="lineno">  942</span><span class="comment"> */</span></div>
<div class="line"><a id="l00943" name="l00943"></a><span class="lineno"><a class="line" href="group___g_a04.html#gae3bde947a89c6dadfc4dc22aea85b467">  943</a></span><a class="code hl_function" href="group___g_a04.html#gae3bde947a89c6dadfc4dc22aea85b467">uint8_t</a> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a04.html#gae3bde947a89c6dadfc4dc22aea85b467">getRdsProgramType</a>(<span class="keywordtype">void</span>)</div>
<div class="line"><a id="l00944" name="l00944"></a><span class="lineno">  944</span>{</div>
<div class="line"><a id="l00945" name="l00945"></a><span class="lineno">  945</span>    rds_blockb blkb;</div>
<div class="line"><a id="l00946" name="l00946"></a><span class="lineno">  946</span>    blkb.blockB = reg0d-&gt;RDSB;</div>
<div class="line"><a id="l00947" name="l00947"></a><span class="lineno">  947</span>    <span class="keywordflow">return</span> blkb.refined.programType;</div>
<div class="line"><a id="l00948" name="l00948"></a><span class="lineno">  948</span>}</div>
<div class="line"><a id="l00949" name="l00949"></a><span class="lineno">  949</span> </div>
<div class="line"><a id="l00950" name="l00950"></a><span class="lineno">  950</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno">  951</span><span class="comment"> * @ingroup GA04</span></div>
<div class="line"><span class="lineno">  952</span><span class="comment"> *</span></div>
<div class="line"><span class="lineno">  953</span><span class="comment"> * @brief Process data received from group 2B</span></div>
<div class="line"><span class="lineno">  954</span><span class="comment"> * @param c  char array reference to the &quot;group 2B&quot; text</span></div>
<div class="line"><span class="lineno">  955</span><span class="comment"> */</span></div>
<div class="line"><a id="l00956" name="l00956"></a><span class="lineno"><a class="line" href="group___g_a04.html#ga6afb347f32121c480adea2a36032d56f">  956</a></span><span class="keywordtype">void</span> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a04.html#ga6afb347f32121c480adea2a36032d56f">getNext2Block</a>(<span class="keywordtype">char</span> *c)</div>
<div class="line"><a id="l00957" name="l00957"></a><span class="lineno">  957</span>{</div>
<div class="line"><a id="l00958" name="l00958"></a><span class="lineno">  958</span>    <span class="keywordtype">char</span> raw[2];</div>
<div class="line"><a id="l00959" name="l00959"></a><span class="lineno">  959</span>    <span class="keywordtype">int</span> i, j;</div>
<div class="line"><a id="l00960" name="l00960"></a><span class="lineno">  960</span>    word16_to_bytes blk;</div>
<div class="line"><a id="l00961" name="l00961"></a><span class="lineno">  961</span> </div>
<div class="line"><a id="l00962" name="l00962"></a><span class="lineno">  962</span>    blk.raw = reg0f-&gt;RDSD;</div>
<div class="line"><a id="l00963" name="l00963"></a><span class="lineno">  963</span> </div>
<div class="line"><a id="l00964" name="l00964"></a><span class="lineno">  964</span>    raw[1] = blk.refined.lowByte;</div>
<div class="line"><a id="l00965" name="l00965"></a><span class="lineno">  965</span>    raw[0] = blk.refined.highByte;</div>
<div class="line"><a id="l00966" name="l00966"></a><span class="lineno">  966</span> </div>
<div class="line"><a id="l00967" name="l00967"></a><span class="lineno">  967</span>    <span class="keywordflow">for</span> (i = j = 0; i &lt; 2; i++)</div>
<div class="line"><a id="l00968" name="l00968"></a><span class="lineno">  968</span>    {</div>
<div class="line"><a id="l00969" name="l00969"></a><span class="lineno">  969</span>        <span class="keywordflow">if</span> (raw[i] == 0xD || raw[i] == 0xA)</div>
<div class="line"><a id="l00970" name="l00970"></a><span class="lineno">  970</span>        {</div>
<div class="line"><a id="l00971" name="l00971"></a><span class="lineno">  971</span>            c[j] = <span class="stringliteral">&#39;\0&#39;</span>;</div>
<div class="line"><a id="l00972" name="l00972"></a><span class="lineno">  972</span>            <span class="keywordflow">return</span>;</div>
<div class="line"><a id="l00973" name="l00973"></a><span class="lineno">  973</span>        }</div>
<div class="line"><a id="l00974" name="l00974"></a><span class="lineno">  974</span>        <span class="keywordflow">if</span> (raw[i] &gt;= 32)</div>
<div class="line"><a id="l00975" name="l00975"></a><span class="lineno">  975</span>        {</div>
<div class="line"><a id="l00976" name="l00976"></a><span class="lineno">  976</span>            c[j] = raw[i];</div>
<div class="line"><a id="l00977" name="l00977"></a><span class="lineno">  977</span>            j++;</div>
<div class="line"><a id="l00978" name="l00978"></a><span class="lineno">  978</span>        }</div>
<div class="line"><a id="l00979" name="l00979"></a><span class="lineno">  979</span>        <span class="keywordflow">else</span></div>
<div class="line"><a id="l00980" name="l00980"></a><span class="lineno">  980</span>        {</div>
<div class="line"><a id="l00981" name="l00981"></a><span class="lineno">  981</span>            c[i] = <span class="stringliteral">&#39; &#39;</span>;</div>
<div class="line"><a id="l00982" name="l00982"></a><span class="lineno">  982</span>        }</div>
<div class="line"><a id="l00983" name="l00983"></a><span class="lineno">  983</span>    }</div>
<div class="line"><a id="l00984" name="l00984"></a><span class="lineno">  984</span>}</div>
<div class="line"><a id="l00985" name="l00985"></a><span class="lineno">  985</span> </div>
<div class="line"><a id="l00986" name="l00986"></a><span class="lineno">  986</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno">  987</span><span class="comment"> * @ingroup GA04</span></div>
<div class="line"><span class="lineno">  988</span><span class="comment"> *</span></div>
<div class="line"><span class="lineno">  989</span><span class="comment"> * @brief Process data received from group 2A</span></div>
<div class="line"><span class="lineno">  990</span><span class="comment"> *</span></div>
<div class="line"><span class="lineno">  991</span><span class="comment"> * @param c  char array reference to the &quot;group  2A&quot; text</span></div>
<div class="line"><span class="lineno">  992</span><span class="comment"> */</span></div>
<div class="line"><a id="l00993" name="l00993"></a><span class="lineno"><a class="line" href="group___g_a04.html#ga3ab713bb63978518d42a761b9db445c9">  993</a></span><span class="keywordtype">void</span> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a04.html#ga3ab713bb63978518d42a761b9db445c9">getNext4Block</a>(<span class="keywordtype">char</span> *c)</div>
<div class="line"><a id="l00994" name="l00994"></a><span class="lineno">  994</span>{</div>
<div class="line"><a id="l00995" name="l00995"></a><span class="lineno">  995</span>    <span class="keywordtype">char</span> raw[4];</div>
<div class="line"><a id="l00996" name="l00996"></a><span class="lineno">  996</span>    <span class="keywordtype">int</span> i, j;</div>
<div class="line"><a id="l00997" name="l00997"></a><span class="lineno">  997</span>    word16_to_bytes blk_c, blk_d;</div>
<div class="line"><a id="l00998" name="l00998"></a><span class="lineno">  998</span> </div>
<div class="line"><a id="l00999" name="l00999"></a><span class="lineno">  999</span>    blk_c.raw = reg0e-&gt;RDSC;</div>
<div class="line"><a id="l01000" name="l01000"></a><span class="lineno"> 1000</span>    blk_d.raw = reg0f-&gt;RDSD;</div>
<div class="line"><a id="l01001" name="l01001"></a><span class="lineno"> 1001</span> </div>
<div class="line"><a id="l01002" name="l01002"></a><span class="lineno"> 1002</span>    raw[0] = blk_c.refined.highByte;</div>
<div class="line"><a id="l01003" name="l01003"></a><span class="lineno"> 1003</span>    raw[1] = blk_c.refined.lowByte;</div>
<div class="line"><a id="l01004" name="l01004"></a><span class="lineno"> 1004</span>    raw[2] = blk_d.refined.highByte;</div>
<div class="line"><a id="l01005" name="l01005"></a><span class="lineno"> 1005</span>    raw[3] = blk_d.refined.lowByte;</div>
<div class="line"><a id="l01006" name="l01006"></a><span class="lineno"> 1006</span> </div>
<div class="line"><a id="l01007" name="l01007"></a><span class="lineno"> 1007</span>    <span class="keywordflow">for</span> (i = j = 0; i &lt; 4; i++)</div>
<div class="line"><a id="l01008" name="l01008"></a><span class="lineno"> 1008</span>    {</div>
<div class="line"><a id="l01009" name="l01009"></a><span class="lineno"> 1009</span>        <span class="keywordflow">if</span> (raw[i] == 0xD || raw[i] == 0xA)</div>
<div class="line"><a id="l01010" name="l01010"></a><span class="lineno"> 1010</span>        {</div>
<div class="line"><a id="l01011" name="l01011"></a><span class="lineno"> 1011</span>            c[j] = <span class="stringliteral">&#39;\0&#39;</span>;</div>
<div class="line"><a id="l01012" name="l01012"></a><span class="lineno"> 1012</span>            <span class="keywordflow">return</span>;</div>
<div class="line"><a id="l01013" name="l01013"></a><span class="lineno"> 1013</span>        }</div>
<div class="line"><a id="l01014" name="l01014"></a><span class="lineno"> 1014</span>        <span class="keywordflow">if</span> (raw[i] &gt;= 32)</div>
<div class="line"><a id="l01015" name="l01015"></a><span class="lineno"> 1015</span>        {</div>
<div class="line"><a id="l01016" name="l01016"></a><span class="lineno"> 1016</span>            c[j] = raw[i];</div>
<div class="line"><a id="l01017" name="l01017"></a><span class="lineno"> 1017</span>            j++;</div>
<div class="line"><a id="l01018" name="l01018"></a><span class="lineno"> 1018</span>        }</div>
<div class="line"><a id="l01019" name="l01019"></a><span class="lineno"> 1019</span>        <span class="keywordflow">else</span></div>
<div class="line"><a id="l01020" name="l01020"></a><span class="lineno"> 1020</span>        {</div>
<div class="line"><a id="l01021" name="l01021"></a><span class="lineno"> 1021</span>            c[i] = <span class="stringliteral">&#39; &#39;</span>;</div>
<div class="line"><a id="l01022" name="l01022"></a><span class="lineno"> 1022</span>        }</div>
<div class="line"><a id="l01023" name="l01023"></a><span class="lineno"> 1023</span>    }</div>
<div class="line"><a id="l01024" name="l01024"></a><span class="lineno"> 1024</span>}</div>
<div class="line"><a id="l01025" name="l01025"></a><span class="lineno"> 1025</span> </div>
<div class="line"><a id="l01026" name="l01026"></a><span class="lineno"> 1026</span> </div>
<div class="line"><a id="l01027" name="l01027"></a><span class="lineno"> 1027</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno"> 1028</span><span class="comment"> * @ingroup GA04</span></div>
<div class="line"><span class="lineno"> 1029</span><span class="comment"> * @brief Gets the station name and other messages.</span></div>
<div class="line"><span class="lineno"> 1030</span><span class="comment"> * @details ATTENTION: You must call getRdsReady before calling this function. </span></div>
<div class="line"><span class="lineno"> 1031</span><span class="comment"> * @return char* should return a string with the station name.</span></div>
<div class="line"><span class="lineno"> 1032</span><span class="comment"> *         However, some stations send other kind of messages</span></div>
<div class="line"><span class="lineno"> 1033</span><span class="comment"> * @see getRdsReady</span></div>
<div class="line"><span class="lineno"> 1034</span><span class="comment"> */</span></div>
<div class="line"><a id="l01035" name="l01035"></a><span class="lineno"><a class="line" href="group___g_a04.html#ga5a26789f1910a5b2098919dbd50e6a3c"> 1035</a></span><span class="keywordtype">char</span> *<a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a04.html#ga5a26789f1910a5b2098919dbd50e6a3c">getRdsText0A</a>(<span class="keywordtype">void</span>)</div>
<div class="line"><a id="l01036" name="l01036"></a><span class="lineno"> 1036</span>{</div>
<div class="line"><a id="l01037" name="l01037"></a><span class="lineno"> 1037</span>    <span class="keyword">static</span> <span class="keywordtype">int</span> rdsTextAdress0A;</div>
<div class="line"><a id="l01038" name="l01038"></a><span class="lineno"> 1038</span>    rds_blockb blkb;</div>
<div class="line"><a id="l01039" name="l01039"></a><span class="lineno"> 1039</span> </div>
<div class="line"><a id="l01040" name="l01040"></a><span class="lineno"> 1040</span>    blkb.blockB = reg0d-&gt;RDSB;</div>
<div class="line"><a id="l01041" name="l01041"></a><span class="lineno"> 1041</span> </div>
<div class="line"><a id="l01042" name="l01042"></a><span class="lineno"> 1042</span>    <span class="keywordflow">if</span> (blkb.group0.groupType == 0)</div>
<div class="line"><a id="l01043" name="l01043"></a><span class="lineno"> 1043</span>    {</div>
<div class="line"><a id="l01044" name="l01044"></a><span class="lineno"> 1044</span>        <span class="comment">// Process group type 0</span></div>
<div class="line"><a id="l01045" name="l01045"></a><span class="lineno"> 1045</span>        rdsTextAdress0A = blkb.group0.address;</div>
<div class="line"><a id="l01046" name="l01046"></a><span class="lineno"> 1046</span>        <span class="keywordflow">if</span> (rdsTextAdress0A &gt;= 0 &amp;&amp; rdsTextAdress0A &lt; 4)</div>
<div class="line"><a id="l01047" name="l01047"></a><span class="lineno"> 1047</span>        {</div>
<div class="line"><a id="l01048" name="l01048"></a><span class="lineno"> 1048</span>            <a class="code hl_function" href="group___g_a04.html#ga6afb347f32121c480adea2a36032d56f">getNext2Block</a><a class="code hl_function" href="group___g_a04.html#ga6afb347f32121c480adea2a36032d56f">(</a>&amp;<a class="code hl_variable" href="group___g_a01.html#a01973fd833000d82609206bfbef62977">rds_buffer0A</a>[rdsTextAdress0A * 2]<a class="code hl_function" href="group___g_a04.html#ga6afb347f32121c480adea2a36032d56f">)</a>;</div>
<div class="line"><a id="l01049" name="l01049"></a><span class="lineno"> 1049</span>            <a class="code hl_variable" href="group___g_a01.html#a01973fd833000d82609206bfbef62977">rds_buffer0A</a>[8] = <span class="stringliteral">&#39;\0&#39;</span>;</div>
<div class="line"><a id="l01050" name="l01050"></a><span class="lineno"> 1050</span>            <span class="keywordflow">return</span> <a class="code hl_variable" href="group___g_a01.html#a01973fd833000d82609206bfbef62977">rds_buffer0A</a>;</div>
<div class="line"><a id="l01051" name="l01051"></a><span class="lineno"> 1051</span>        }</div>
<div class="line"><a id="l01052" name="l01052"></a><span class="lineno"> 1052</span>    }</div>
<div class="line"><a id="l01053" name="l01053"></a><span class="lineno"> 1053</span>    <span class="keywordflow">return</span> NULL;</div>
<div class="line"><a id="l01054" name="l01054"></a><span class="lineno"> 1054</span>}</div>
<div class="line"><a id="l01055" name="l01055"></a><span class="lineno"> 1055</span> </div>
<div class="line"><a id="l01056" name="l01056"></a><span class="lineno"> 1056</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno"> 1057</span><span class="comment"> * @ingroup @ingroup GA04</span></div>
<div class="line"><span class="lineno"> 1058</span><span class="comment"> *</span></div>
<div class="line"><span class="lineno"> 1059</span><span class="comment"> * @brief Gets the Program Information</span></div>
<div class="line"><span class="lineno"> 1060</span><span class="comment"> * @details Process the program information data. </span></div>
<div class="line"><span class="lineno"> 1061</span><span class="comment"> * @details ATTENTION: You must call getRdsReady before calling this function. </span></div>
<div class="line"><span class="lineno"> 1062</span><span class="comment"> * @return char array with the program information (63 bytes) </span></div>
<div class="line"><span class="lineno"> 1063</span><span class="comment"> * @see getRdsReady</span></div>
<div class="line"><span class="lineno"> 1064</span><span class="comment"> */</span></div>
<div class="line"><a id="l01065" name="l01065"></a><span class="lineno"><a class="line" href="group___g_a04.html#ga482098a64299cb8af976d4d10a460212"> 1065</a></span><span class="keywordtype">char</span> *<a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a04.html#ga482098a64299cb8af976d4d10a460212">getRdsText2A</a>(<span class="keywordtype">void</span>)</div>
<div class="line"><a id="l01066" name="l01066"></a><span class="lineno"> 1066</span>{</div>
<div class="line"><a id="l01067" name="l01067"></a><span class="lineno"> 1067</span>    <span class="keyword">static</span> <span class="keywordtype">int</span> rdsTextAdress2A;</div>
<div class="line"><a id="l01068" name="l01068"></a><span class="lineno"> 1068</span>    rds_blockb blkb;</div>
<div class="line"><a id="l01069" name="l01069"></a><span class="lineno"> 1069</span> </div>
<div class="line"><a id="l01070" name="l01070"></a><span class="lineno"> 1070</span>    blkb.blockB = reg0d-&gt;RDSB;</div>
<div class="line"><a id="l01071" name="l01071"></a><span class="lineno"> 1071</span>    rdsTextAdress2A = blkb.group2.address;</div>
<div class="line"><a id="l01072" name="l01072"></a><span class="lineno"> 1072</span> </div>
<div class="line"><a id="l01073" name="l01073"></a><span class="lineno"> 1073</span>    <span class="keywordflow">if</span> (blkb.group2.groupType == 2)</div>
<div class="line"><a id="l01074" name="l01074"></a><span class="lineno"> 1074</span>    {</div>
<div class="line"><a id="l01075" name="l01075"></a><span class="lineno"> 1075</span>        <span class="comment">// Process group 2A</span></div>
<div class="line"><a id="l01076" name="l01076"></a><span class="lineno"> 1076</span>        <span class="comment">// Decode B block information</span></div>
<div class="line"><a id="l01077" name="l01077"></a><span class="lineno"> 1077</span>        <span class="keywordflow">if</span> (rdsTextAdress2A &gt;= 0 &amp;&amp; rdsTextAdress2A &lt; 16)</div>
<div class="line"><a id="l01078" name="l01078"></a><span class="lineno"> 1078</span>        {</div>
<div class="line"><a id="l01079" name="l01079"></a><span class="lineno"> 1079</span>            <a class="code hl_function" href="group___g_a04.html#ga3ab713bb63978518d42a761b9db445c9">getNext4Block</a><a class="code hl_function" href="group___g_a04.html#ga3ab713bb63978518d42a761b9db445c9">(</a>&amp;<a class="code hl_variable" href="group___g_a01.html#af7eb4e812ca7b0883a3e9c7879a034d9">rds_buffer2A</a>[rdsTextAdress2A * 4]<a class="code hl_function" href="group___g_a04.html#ga3ab713bb63978518d42a761b9db445c9">)</a>;</div>
<div class="line"><a id="l01080" name="l01080"></a><span class="lineno"> 1080</span>            <a class="code hl_variable" href="group___g_a01.html#af7eb4e812ca7b0883a3e9c7879a034d9">rds_buffer2A</a>[63] = <span class="stringliteral">&#39;\0&#39;</span>;</div>
<div class="line"><a id="l01081" name="l01081"></a><span class="lineno"> 1081</span>            <span class="keywordflow">return</span> <a class="code hl_variable" href="group___g_a01.html#af7eb4e812ca7b0883a3e9c7879a034d9">rds_buffer2A</a>;</div>
<div class="line"><a id="l01082" name="l01082"></a><span class="lineno"> 1082</span>        }</div>
<div class="line"><a id="l01083" name="l01083"></a><span class="lineno"> 1083</span>    }</div>
<div class="line"><a id="l01084" name="l01084"></a><span class="lineno"> 1084</span>    <span class="keywordflow">return</span> NULL;</div>
<div class="line"><a id="l01085" name="l01085"></a><span class="lineno"> 1085</span>}</div>
<div class="line"><a id="l01086" name="l01086"></a><span class="lineno"> 1086</span> </div>
<div class="line"><a id="l01087" name="l01087"></a><span class="lineno"> 1087</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno"> 1088</span><span class="comment"> * @ingroup GA04</span></div>
<div class="line"><span class="lineno"> 1089</span><span class="comment"> * @todo Under construction... To be checked.</span></div>
<div class="line"><span class="lineno"> 1090</span><span class="comment"> * @brief Gets the Station Information.  </span></div>
<div class="line"><span class="lineno"> 1091</span><span class="comment"> * @details ATTENTION: You must call getRdsReady before calling this function. </span></div>
<div class="line"><span class="lineno"> 1092</span><span class="comment"> * @return char array with the Text of Station Information (33 bytes)</span></div>
<div class="line"><span class="lineno"> 1093</span><span class="comment"> * @see getRdsReady</span></div>
<div class="line"><span class="lineno"> 1094</span><span class="comment"> */</span></div>
<div class="line"><a id="l01095" name="l01095"></a><span class="lineno"><a class="line" href="group___g_a04.html#gacd6614bc7be99d55a3d9a17739ee7074"> 1095</a></span><span class="keywordtype">char</span> *<a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a04.html#gacd6614bc7be99d55a3d9a17739ee7074">getRdsText2B</a>(<span class="keywordtype">void</span>)</div>
<div class="line"><a id="l01096" name="l01096"></a><span class="lineno"> 1096</span>{</div>
<div class="line"><a id="l01097" name="l01097"></a><span class="lineno"> 1097</span>    <span class="keyword">static</span> <span class="keywordtype">int</span> rdsTextAdress2B;</div>
<div class="line"><a id="l01098" name="l01098"></a><span class="lineno"> 1098</span>    rds_blockb blkb;</div>
<div class="line"><a id="l01099" name="l01099"></a><span class="lineno"> 1099</span> </div>
<div class="line"><a id="l01100" name="l01100"></a><span class="lineno"> 1100</span>    blkb.blockB = reg0d-&gt;RDSB;</div>
<div class="line"><a id="l01101" name="l01101"></a><span class="lineno"> 1101</span>    <span class="keywordflow">if</span> (blkb.group2.groupType == 1)</div>
<div class="line"><a id="l01102" name="l01102"></a><span class="lineno"> 1102</span>    {</div>
<div class="line"><a id="l01103" name="l01103"></a><span class="lineno"> 1103</span>        <span class="comment">// Process group 2B</span></div>
<div class="line"><a id="l01104" name="l01104"></a><span class="lineno"> 1104</span>        rdsTextAdress2B = blkb.group2.address;</div>
<div class="line"><a id="l01105" name="l01105"></a><span class="lineno"> 1105</span>        <span class="keywordflow">if</span> (rdsTextAdress2B &gt;= 0 &amp;&amp; rdsTextAdress2B &lt; 16)</div>
<div class="line"><a id="l01106" name="l01106"></a><span class="lineno"> 1106</span>        {</div>
<div class="line"><a id="l01107" name="l01107"></a><span class="lineno"> 1107</span>            <a class="code hl_function" href="group___g_a04.html#ga6afb347f32121c480adea2a36032d56f">getNext2Block</a><a class="code hl_function" href="group___g_a04.html#ga6afb347f32121c480adea2a36032d56f">(</a>&amp;<a class="code hl_variable" href="group___g_a01.html#a81d7aaf8d628afb9cc268777fea95045">rds_buffer2B</a>[rdsTextAdress2B * 2]<a class="code hl_function" href="group___g_a04.html#ga6afb347f32121c480adea2a36032d56f">)</a>;</div>
<div class="line"><a id="l01108" name="l01108"></a><span class="lineno"> 1108</span>            <span class="keywordflow">return</span> <a class="code hl_variable" href="group___g_a01.html#a81d7aaf8d628afb9cc268777fea95045">rds_buffer2B</a>;</div>
<div class="line"><a id="l01109" name="l01109"></a><span class="lineno"> 1109</span>        }</div>
<div class="line"><a id="l01110" name="l01110"></a><span class="lineno"> 1110</span>    }</div>
<div class="line"><a id="l01111" name="l01111"></a><span class="lineno"> 1111</span>    <span class="keywordflow">return</span> NULL;</div>
<div class="line"><a id="l01112" name="l01112"></a><span class="lineno"> 1112</span>}</div>
<div class="line"><a id="l01113" name="l01113"></a><span class="lineno"> 1113</span> </div>
<div class="line"><a id="l01114" name="l01114"></a><span class="lineno"> 1114</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno"> 1115</span><span class="comment"> * @ingroup GA04</span></div>
<div class="line"><span class="lineno"> 1116</span><span class="comment"> * @brief Gets the RDS UTC time and date when the Group type is 4</span></div>
<div class="line"><span class="lineno"> 1117</span><span class="comment"> * @details ATTENTION: You must call getRdsReady before calling this function. </span></div>
<div class="line"><span class="lineno"> 1118</span><span class="comment"> * @details ATTENTION: Some stations broadcast wrong time.</span></div>
<div class="line"><span class="lineno"> 1119</span><span class="comment"> * @return char* a string with hh:mm +/- offset</span></div>
<div class="line"><span class="lineno"> 1120</span><span class="comment"> * @see getRdsReady</span></div>
<div class="line"><span class="lineno"> 1121</span><span class="comment"> */</span></div>
<div class="line"><a id="l01122" name="l01122"></a><span class="lineno"><a class="line" href="group___g_a04.html#gaef398d848e7378ec4897965b8e1b4441"> 1122</a></span><span class="keywordtype">char</span> *<a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a04.html#gaef398d848e7378ec4897965b8e1b4441">getRdsTime</a>()</div>
<div class="line"><a id="l01123" name="l01123"></a><span class="lineno"> 1123</span>{</div>
<div class="line"><a id="l01124" name="l01124"></a><span class="lineno"> 1124</span>    rds_date_time dt;</div>
<div class="line"><a id="l01125" name="l01125"></a><span class="lineno"> 1125</span>    word16_to_bytes blk_b, blk_c, blk_d;</div>
<div class="line"><a id="l01126" name="l01126"></a><span class="lineno"> 1126</span>    rds_blockb blkb;</div>
<div class="line"><a id="l01127" name="l01127"></a><span class="lineno"> 1127</span> </div>
<div class="line"><a id="l01128" name="l01128"></a><span class="lineno"> 1128</span>    blk_b.raw = blkb.blockB = reg0d-&gt;RDSB;</div>
<div class="line"><a id="l01129" name="l01129"></a><span class="lineno"> 1129</span>    blk_c.raw = reg0e-&gt;RDSC;</div>
<div class="line"><a id="l01130" name="l01130"></a><span class="lineno"> 1130</span>    blk_d.raw = reg0f-&gt;RDSD;</div>
<div class="line"><a id="l01131" name="l01131"></a><span class="lineno"> 1131</span> </div>
<div class="line"><a id="l01132" name="l01132"></a><span class="lineno"> 1132</span>    uint16_t minute;</div>
<div class="line"><a id="l01133" name="l01133"></a><span class="lineno"> 1133</span>    uint16_t hour;</div>
<div class="line"><a id="l01134" name="l01134"></a><span class="lineno"> 1134</span> </div>
<div class="line"><a id="l01135" name="l01135"></a><span class="lineno"> 1135</span>    <span class="keywordflow">if</span> (blkb.group0.groupType == 4)</div>
<div class="line"><a id="l01136" name="l01136"></a><span class="lineno"> 1136</span>    {</div>
<div class="line"><a id="l01137" name="l01137"></a><span class="lineno"> 1137</span>        <span class="keywordtype">char</span> offset_sign;</div>
<div class="line"><a id="l01138" name="l01138"></a><span class="lineno"> 1138</span>        <span class="keywordtype">int</span> offset_h;</div>
<div class="line"><a id="l01139" name="l01139"></a><span class="lineno"> 1139</span>        <span class="keywordtype">int</span> offset_m;</div>
<div class="line"><a id="l01140" name="l01140"></a><span class="lineno"> 1140</span> </div>
<div class="line"><a id="l01141" name="l01141"></a><span class="lineno"> 1141</span>        <span class="comment">// uint16_t y, m, d;</span></div>
<div class="line"><a id="l01142" name="l01142"></a><span class="lineno"> 1142</span> </div>
<div class="line"><a id="l01143" name="l01143"></a><span class="lineno"> 1143</span>        dt.raw[4] = blk_b.refined.lowByte;</div>
<div class="line"><a id="l01144" name="l01144"></a><span class="lineno"> 1144</span>        dt.raw[5] = blk_b.refined.highByte;</div>
<div class="line"><a id="l01145" name="l01145"></a><span class="lineno"> 1145</span> </div>
<div class="line"><a id="l01146" name="l01146"></a><span class="lineno"> 1146</span>        dt.raw[2] = blk_c.refined.lowByte;</div>
<div class="line"><a id="l01147" name="l01147"></a><span class="lineno"> 1147</span>        dt.raw[3] = blk_c.refined.highByte;</div>
<div class="line"><a id="l01148" name="l01148"></a><span class="lineno"> 1148</span> </div>
<div class="line"><a id="l01149" name="l01149"></a><span class="lineno"> 1149</span>        dt.raw[0] = blk_d.refined.lowByte;</div>
<div class="line"><a id="l01150" name="l01150"></a><span class="lineno"> 1150</span>        dt.raw[1] = blk_d.refined.highByte;</div>
<div class="line"><a id="l01151" name="l01151"></a><span class="lineno"> 1151</span> </div>
<div class="line"><a id="l01152" name="l01152"></a><span class="lineno"> 1152</span>        minute = dt.refined.minute;</div>
<div class="line"><a id="l01153" name="l01153"></a><span class="lineno"> 1153</span>        hour = dt.refined.hour;</div>
<div class="line"><a id="l01154" name="l01154"></a><span class="lineno"> 1154</span> </div>
<div class="line"><a id="l01155" name="l01155"></a><span class="lineno"> 1155</span>        offset_sign = (dt.refined.offset_sense == 1) ? <span class="stringliteral">&#39;+&#39;</span> : <span class="stringliteral">&#39;-&#39;</span>;</div>
<div class="line"><a id="l01156" name="l01156"></a><span class="lineno"> 1156</span>        offset_h = (dt.refined.offset * 30) / 60;</div>
<div class="line"><a id="l01157" name="l01157"></a><span class="lineno"> 1157</span>        offset_m = (dt.refined.offset * 30) - (offset_h * 60);</div>
<div class="line"><a id="l01158" name="l01158"></a><span class="lineno"> 1158</span> </div>
<div class="line"><a id="l01159" name="l01159"></a><span class="lineno"> 1159</span>        <span class="comment">// sprintf(rds_time, &quot;%02u:%02u %c%02u:%02u&quot;, hour, minute, offset_sign, offset_h, offset_m);</span></div>
<div class="line"><a id="l01160" name="l01160"></a><span class="lineno"> 1160</span>        <span class="keyword">this</span>-&gt;convertToChar(hour, rds_time, 2, 0, <span class="stringliteral">&#39; &#39;</span>, <span class="keyword">false</span>);</div>
<div class="line"><a id="l01161" name="l01161"></a><span class="lineno"> 1161</span>        <a class="code hl_variable" href="group___g_a01.html#a3d9eae606a7de8a650611eaf1f9a8482">rds_time</a>[2] = <span class="stringliteral">&#39;:&#39;</span>;</div>
<div class="line"><a id="l01162" name="l01162"></a><span class="lineno"> 1162</span>        <span class="keyword">this</span>-&gt;convertToChar(minute, &amp;rds_time[3], 2, 0, <span class="stringliteral">&#39; &#39;</span>, <span class="keyword">false</span>);</div>
<div class="line"><a id="l01163" name="l01163"></a><span class="lineno"> 1163</span>        <a class="code hl_variable" href="group___g_a01.html#a3d9eae606a7de8a650611eaf1f9a8482">rds_time</a>[5] = <span class="stringliteral">&#39; &#39;</span>;</div>
<div class="line"><a id="l01164" name="l01164"></a><span class="lineno"> 1164</span>        <a class="code hl_variable" href="group___g_a01.html#a3d9eae606a7de8a650611eaf1f9a8482">rds_time</a>[6] = offset_sign;</div>
<div class="line"><a id="l01165" name="l01165"></a><span class="lineno"> 1165</span>        <span class="keyword">this</span>-&gt;convertToChar(offset_h, &amp;<a class="code hl_variable" href="group___g_a01.html#a3d9eae606a7de8a650611eaf1f9a8482">rds_time</a>[7], 2, 0, <span class="stringliteral">&#39; &#39;</span>, <span class="keyword">false</span>);</div>
<div class="line"><a id="l01166" name="l01166"></a><span class="lineno"> 1166</span>        <a class="code hl_variable" href="group___g_a01.html#a3d9eae606a7de8a650611eaf1f9a8482">rds_time</a>[9] = <span class="stringliteral">&#39;:&#39;</span>;</div>
<div class="line"><a id="l01167" name="l01167"></a><span class="lineno"> 1167</span>        <span class="keyword">this</span>-&gt;convertToChar(offset_m, &amp;<a class="code hl_variable" href="group___g_a01.html#a3d9eae606a7de8a650611eaf1f9a8482">rds_time</a>[10], 2, 0, <span class="stringliteral">&#39; &#39;</span>, <span class="keyword">false</span>);</div>
<div class="line"><a id="l01168" name="l01168"></a><span class="lineno"> 1168</span>        <a class="code hl_variable" href="group___g_a01.html#a3d9eae606a7de8a650611eaf1f9a8482">rds_time</a>[12] = <span class="stringliteral">&#39;\0&#39;</span>;</div>
<div class="line"><a id="l01169" name="l01169"></a><span class="lineno"> 1169</span> </div>
<div class="line"><a id="l01170" name="l01170"></a><span class="lineno"> 1170</span>        <span class="keywordflow">return</span> <a class="code hl_variable" href="group___g_a01.html#a3d9eae606a7de8a650611eaf1f9a8482">rds_time</a>;</div>
<div class="line"><a id="l01171" name="l01171"></a><span class="lineno"> 1171</span>    }</div>
<div class="line"><a id="l01172" name="l01172"></a><span class="lineno"> 1172</span> </div>
<div class="line"><a id="l01173" name="l01173"></a><span class="lineno"> 1173</span>    <span class="keywordflow">return</span> NULL;</div>
<div class="line"><a id="l01174" name="l01174"></a><span class="lineno"> 1174</span>}</div>
<div class="line"><a id="l01175" name="l01175"></a><span class="lineno"> 1175</span> </div>
<div class="line"><a id="l01176" name="l01176"></a><span class="lineno"> 1176</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno"> 1177</span><span class="comment"> * @ingroup GA04</span></div>
<div class="line"><span class="lineno"> 1178</span><span class="comment"> * @todo Need to check.</span></div>
<div class="line"><span class="lineno"> 1179</span><span class="comment"> * @brief Gets the RDS time converted to local time. </span></div>
<div class="line"><span class="lineno"> 1180</span><span class="comment"> * @details ATTENTION: You must call getRdsReady before calling this function. </span></div>
<div class="line"><span class="lineno"> 1181</span><span class="comment"> * @details ATTENTION: Some stations broadcast wrong time.</span></div>
<div class="line"><span class="lineno"> 1182</span><span class="comment"> * @return char* a string with hh:mm </span></div>
<div class="line"><span class="lineno"> 1183</span><span class="comment"> * @see getRdsReady</span></div>
<div class="line"><span class="lineno"> 1184</span><span class="comment"> */</span></div>
<div class="line"><a id="l01185" name="l01185"></a><span class="lineno"><a class="line" href="group___g_a04.html#gaa3432b4df8ec20277e3d3be60782b395"> 1185</a></span><span class="keywordtype">char</span> *<a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a04.html#gaa3432b4df8ec20277e3d3be60782b395">getRdsLocalTime</a>()</div>
<div class="line"><a id="l01186" name="l01186"></a><span class="lineno"> 1186</span>{</div>
<div class="line"><a id="l01187" name="l01187"></a><span class="lineno"> 1187</span>    rds_date_time dt;</div>
<div class="line"><a id="l01188" name="l01188"></a><span class="lineno"> 1188</span>    word16_to_bytes blk_b, blk_c, blk_d;</div>
<div class="line"><a id="l01189" name="l01189"></a><span class="lineno"> 1189</span>    rds_blockb blkb;</div>
<div class="line"><a id="l01190" name="l01190"></a><span class="lineno"> 1190</span> </div>
<div class="line"><a id="l01191" name="l01191"></a><span class="lineno"> 1191</span>    blk_b.raw = blkb.blockB = reg0d-&gt;RDSB;</div>
<div class="line"><a id="l01192" name="l01192"></a><span class="lineno"> 1192</span>    blk_c.raw = reg0e-&gt;RDSC;</div>
<div class="line"><a id="l01193" name="l01193"></a><span class="lineno"> 1193</span>    blk_d.raw = reg0f-&gt;RDSD;</div>
<div class="line"><a id="l01194" name="l01194"></a><span class="lineno"> 1194</span> </div>
<div class="line"><a id="l01195" name="l01195"></a><span class="lineno"> 1195</span>    uint16_t minute;</div>
<div class="line"><a id="l01196" name="l01196"></a><span class="lineno"> 1196</span>    uint16_t hour;</div>
<div class="line"><a id="l01197" name="l01197"></a><span class="lineno"> 1197</span>    uint16_t localTime;</div>
<div class="line"><a id="l01198" name="l01198"></a><span class="lineno"> 1198</span> </div>
<div class="line"><a id="l01199" name="l01199"></a><span class="lineno"> 1199</span>    <span class="keywordflow">if</span> (blkb.group0.groupType == 4)</div>
<div class="line"><a id="l01200" name="l01200"></a><span class="lineno"> 1200</span>    {</div>
<div class="line"><a id="l01201" name="l01201"></a><span class="lineno"> 1201</span>        <span class="keywordtype">int</span> offset_h;</div>
<div class="line"><a id="l01202" name="l01202"></a><span class="lineno"> 1202</span>        <span class="keywordtype">int</span> offset_m;</div>
<div class="line"><a id="l01203" name="l01203"></a><span class="lineno"> 1203</span> </div>
<div class="line"><a id="l01204" name="l01204"></a><span class="lineno"> 1204</span>        dt.raw[4] = blk_b.refined.lowByte;</div>
<div class="line"><a id="l01205" name="l01205"></a><span class="lineno"> 1205</span>        dt.raw[5] = blk_b.refined.highByte;</div>
<div class="line"><a id="l01206" name="l01206"></a><span class="lineno"> 1206</span> </div>
<div class="line"><a id="l01207" name="l01207"></a><span class="lineno"> 1207</span>        dt.raw[2] = blk_c.refined.lowByte;</div>
<div class="line"><a id="l01208" name="l01208"></a><span class="lineno"> 1208</span>        dt.raw[3] = blk_c.refined.highByte;</div>
<div class="line"><a id="l01209" name="l01209"></a><span class="lineno"> 1209</span> </div>
<div class="line"><a id="l01210" name="l01210"></a><span class="lineno"> 1210</span>        dt.raw[0] = blk_d.refined.lowByte;</div>
<div class="line"><a id="l01211" name="l01211"></a><span class="lineno"> 1211</span>        dt.raw[1] = blk_d.refined.highByte;</div>
<div class="line"><a id="l01212" name="l01212"></a><span class="lineno"> 1212</span> </div>
<div class="line"><a id="l01213" name="l01213"></a><span class="lineno"> 1213</span>        minute = dt.refined.minute;</div>
<div class="line"><a id="l01214" name="l01214"></a><span class="lineno"> 1214</span>        hour = dt.refined.hour;</div>
<div class="line"><a id="l01215" name="l01215"></a><span class="lineno"> 1215</span> </div>
<div class="line"><a id="l01216" name="l01216"></a><span class="lineno"> 1216</span>        offset_h = (dt.refined.offset * 30) / 60;</div>
<div class="line"><a id="l01217" name="l01217"></a><span class="lineno"> 1217</span>        offset_m = (dt.refined.offset * 30) - (offset_h * 60);</div>
<div class="line"><a id="l01218" name="l01218"></a><span class="lineno"> 1218</span> </div>
<div class="line"><a id="l01219" name="l01219"></a><span class="lineno"> 1219</span>        localTime = (hour * 60  + minute);</div>
<div class="line"><a id="l01220" name="l01220"></a><span class="lineno"> 1220</span>        <span class="keywordflow">if</span> ( dt.refined.offset_sense == 1)</div>
<div class="line"><a id="l01221" name="l01221"></a><span class="lineno"> 1221</span>            localTime -= (offset_h * 60 + offset_m);</div>
<div class="line"><a id="l01222" name="l01222"></a><span class="lineno"> 1222</span>        <span class="keywordflow">else</span></div>
<div class="line"><a id="l01223" name="l01223"></a><span class="lineno"> 1223</span>            localTime += (offset_h * 60 + offset_m);</div>
<div class="line"><a id="l01224" name="l01224"></a><span class="lineno"> 1224</span> </div>
<div class="line"><a id="l01225" name="l01225"></a><span class="lineno"> 1225</span>        hour = localTime / 60;</div>
<div class="line"><a id="l01226" name="l01226"></a><span class="lineno"> 1226</span>        minute = localTime - (hour * 60);</div>
<div class="line"><a id="l01227" name="l01227"></a><span class="lineno"> 1227</span> </div>
<div class="line"><a id="l01228" name="l01228"></a><span class="lineno"> 1228</span>        <span class="keyword">this</span>-&gt;convertToChar(hour, rds_time, 2, 0, <span class="stringliteral">&#39; &#39;</span>, <span class="keyword">false</span>);</div>
<div class="line"><a id="l01229" name="l01229"></a><span class="lineno"> 1229</span>        <a class="code hl_variable" href="group___g_a01.html#a3d9eae606a7de8a650611eaf1f9a8482">rds_time</a>[2] = <span class="stringliteral">&#39;:&#39;</span>;</div>
<div class="line"><a id="l01230" name="l01230"></a><span class="lineno"> 1230</span>        <span class="keyword">this</span>-&gt;convertToChar(minute, &amp;rds_time[3], 2, 0, <span class="stringliteral">&#39; &#39;</span>, <span class="keyword">false</span>);</div>
<div class="line"><a id="l01231" name="l01231"></a><span class="lineno"> 1231</span>        <a class="code hl_variable" href="group___g_a01.html#a3d9eae606a7de8a650611eaf1f9a8482">rds_time</a>[5] = <span class="stringliteral">&#39;\0&#39;</span>;</div>
<div class="line"><a id="l01232" name="l01232"></a><span class="lineno"> 1232</span> </div>
<div class="line"><a id="l01233" name="l01233"></a><span class="lineno"> 1233</span>        <span class="keywordflow">return</span> <a class="code hl_variable" href="group___g_a01.html#a3d9eae606a7de8a650611eaf1f9a8482">rds_time</a>;</div>
<div class="line"><a id="l01234" name="l01234"></a><span class="lineno"> 1234</span>    }</div>
<div class="line"><a id="l01235" name="l01235"></a><span class="lineno"> 1235</span> </div>
<div class="line"><a id="l01236" name="l01236"></a><span class="lineno"> 1236</span>    <span class="keywordflow">return</span> NULL;</div>
<div class="line"><a id="l01237" name="l01237"></a><span class="lineno"> 1237</span>}</div>
<div class="line"><a id="l01238" name="l01238"></a><span class="lineno"> 1238</span> </div>
<div class="line"><a id="l01239" name="l01239"></a><span class="lineno"> 1239</span> </div>
<div class="line"><a id="l01240" name="l01240"></a><span class="lineno"> 1240</span> </div>
<div class="line"><a id="l01241" name="l01241"></a><span class="lineno"> 1241</span> </div>
<div class="line"><a id="l01242" name="l01242"></a><span class="lineno"> 1242</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno"> 1243</span><span class="comment"> * @ingroup GA04</span></div>
<div class="line"><span class="lineno"> 1244</span><span class="comment"> * @brief Sets RDS fifo mode enable</span></div>
<div class="line"><span class="lineno"> 1245</span><span class="comment"> *</span></div>
<div class="line"><span class="lineno"> 1246</span><span class="comment"> * @param value  If true, it makes the the fifo mode enable.</span></div>
<div class="line"><span class="lineno"> 1247</span><span class="comment"> * @return true  or false</span></div>
<div class="line"><span class="lineno"> 1248</span><span class="comment"> */</span></div>
<div class="line"><a id="l01249" name="l01249"></a><span class="lineno"><a class="line" href="group___g_a04.html#gae27337170a5f3dedebf585aa19855ad6"> 1249</a></span><span class="keywordtype">void</span> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a04.html#gae27337170a5f3dedebf585aa19855ad6">setRdsFifo</a>(<span class="keywordtype">bool</span> value)</div>
<div class="line"><a id="l01250" name="l01250"></a><span class="lineno"> 1250</span>{</div>
<div class="line"><a id="l01251" name="l01251"></a><span class="lineno"> 1251</span>    reg04-&gt;refined.RDS_FIFO_EN = value;</div>
<div class="line"><a id="l01252" name="l01252"></a><span class="lineno"> 1252</span>    setRegister(<a class="code hl_define" href="_r_d_a5807_8h.html#a88dee04c27a51e335798ab012dccbea1">REG04</a>, reg04-&gt;raw);</div>
<div class="line"><a id="l01253" name="l01253"></a><span class="lineno"> 1253</span>}</div>
<div class="line"><a id="l01254" name="l01254"></a><span class="lineno"> 1254</span> </div>
<div class="line"><a id="l01255" name="l01255"></a><span class="lineno"> 1255</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno"> 1256</span><span class="comment"> * @ingroup GA04</span></div>
<div class="line"><span class="lineno"> 1257</span><span class="comment"> * @brief Clear RDS fifo</span></div>
<div class="line"><span class="lineno"> 1258</span><span class="comment"> *</span></div>
<div class="line"><span class="lineno"> 1259</span><span class="comment"> * @param value  If true, clears the RDS fifo</span></div>
<div class="line"><span class="lineno"> 1260</span><span class="comment"> * @return true  or false</span></div>
<div class="line"><span class="lineno"> 1261</span><span class="comment"> */</span></div>
<div class="line"><a id="l01262" name="l01262"></a><span class="lineno"><a class="line" href="group___g_a04.html#ga196b453f68b2a23d2e6b2515c6412ee2"> 1262</a></span><span class="keywordtype">void</span> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a04.html#ga196b453f68b2a23d2e6b2515c6412ee2">clearRdsFifo</a>(<span class="keywordtype">bool</span> value)</div>
<div class="line"><a id="l01263" name="l01263"></a><span class="lineno"> 1263</span>{</div>
<div class="line"><a id="l01264" name="l01264"></a><span class="lineno"> 1264</span>    reg04-&gt;refined.RDS_FIFO_CLR = value;</div>
<div class="line"><a id="l01265" name="l01265"></a><span class="lineno"> 1265</span>    setRegister(<a class="code hl_define" href="_r_d_a5807_8h.html#a88dee04c27a51e335798ab012dccbea1">REG04</a>, reg04-&gt;raw);</div>
<div class="line"><a id="l01266" name="l01266"></a><span class="lineno"> 1266</span>}</div>
<div class="line"><a id="l01267" name="l01267"></a><span class="lineno"> 1267</span> </div>
<div class="line"><a id="l01268" name="l01268"></a><span class="lineno"> 1268</span> </div>
<div class="line"><a id="l01269" name="l01269"></a><span class="lineno"> 1269</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno"> 1270</span><span class="comment"> * @ingroup GA04</span></div>
<div class="line"><span class="lineno"> 1271</span><span class="comment"> * @brief Clear RDS Information (Station Name, Station Information, Program Information and Time)</span></div>
<div class="line"><span class="lineno"> 1272</span><span class="comment"> * @details Clear the buffer with latest RDS information</span></div>
<div class="line"><span class="lineno"> 1273</span><span class="comment"> */</span></div>
<div class="line"><a id="l01274" name="l01274"></a><span class="lineno"><a class="line" href="group___g_a04.html#ga22c43e0f08a650bd32446eef6cd8f550"> 1274</a></span><span class="keywordtype">void</span> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a04.html#ga22c43e0f08a650bd32446eef6cd8f550">clearRdsBuffer</a>()</div>
<div class="line"><a id="l01275" name="l01275"></a><span class="lineno"> 1275</span>{</div>
<div class="line"><a id="l01276" name="l01276"></a><span class="lineno"> 1276</span>    memset(<a class="code hl_variable" href="group___g_a01.html#a01973fd833000d82609206bfbef62977">rds_buffer0A</a>, 0, <span class="keyword">sizeof</span>(<a class="code hl_variable" href="group___g_a01.html#a01973fd833000d82609206bfbef62977">rds_buffer0A</a>));</div>
<div class="line"><a id="l01277" name="l01277"></a><span class="lineno"> 1277</span>    memset(<a class="code hl_variable" href="group___g_a01.html#af7eb4e812ca7b0883a3e9c7879a034d9">rds_buffer2A</a> , 0, <span class="keyword">sizeof</span>(<a class="code hl_variable" href="group___g_a01.html#af7eb4e812ca7b0883a3e9c7879a034d9">rds_buffer2A</a>));</div>
<div class="line"><a id="l01278" name="l01278"></a><span class="lineno"> 1278</span>    memset(<a class="code hl_variable" href="group___g_a01.html#a81d7aaf8d628afb9cc268777fea95045">rds_buffer2B</a>, 0, <span class="keyword">sizeof</span>(<a class="code hl_variable" href="group___g_a01.html#a81d7aaf8d628afb9cc268777fea95045">rds_buffer2B</a>));</div>
<div class="line"><a id="l01279" name="l01279"></a><span class="lineno"> 1279</span>    memset(<a class="code hl_variable" href="group___g_a01.html#a3d9eae606a7de8a650611eaf1f9a8482">rds_time</a>, 0, <span class="keyword">sizeof</span>(<a class="code hl_variable" href="group___g_a01.html#a3d9eae606a7de8a650611eaf1f9a8482">rds_time</a>));</div>
<div class="line"><a id="l01280" name="l01280"></a><span class="lineno"> 1280</span>}</div>
<div class="line"><a id="l01281" name="l01281"></a><span class="lineno"> 1281</span> </div>
<div class="line"><a id="l01282" name="l01282"></a><span class="lineno"> 1282</span> </div>
<div class="line"><a id="l01283" name="l01283"></a><span class="lineno"> 1283</span> </div>
<div class="line"><a id="l01284" name="l01284"></a><span class="lineno"> 1284</span><span class="comment">/** @defgroup G05 Tools method</span></div>
<div class="line"><span class="lineno"> 1285</span><span class="comment"> * @details A set of functions used to support other functions</span></div>
<div class="line"><span class="lineno"> 1286</span><span class="comment"> */</span></div>
<div class="line"><a id="l01287" name="l01287"></a><span class="lineno"> 1287</span> </div>
<div class="line"><a id="l01288" name="l01288"></a><span class="lineno"> 1288</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno"> 1289</span><span class="comment"> * @ingroup G05 Covert numbers to char array</span></div>
<div class="line"><span class="lineno"> 1290</span><span class="comment"> * @brief Converts a number to a char array</span></div>
<div class="line"><span class="lineno"> 1291</span><span class="comment"> * @details It is useful to mitigate memory space used by functions like sprintf or othetr generic similar functions</span></div>
<div class="line"><span class="lineno"> 1292</span><span class="comment"> * @details You can use it to format frequency using decimal or tousand separator and also to convert smalm numbers.</span></div>
<div class="line"><span class="lineno"> 1293</span><span class="comment"> *</span></div>
<div class="line"><span class="lineno"> 1294</span><span class="comment"> * @param value  value to be converted</span></div>
<div class="line"><span class="lineno"> 1295</span><span class="comment"> * @param strValue char array that will be receive the converted value</span></div>
<div class="line"><span class="lineno"> 1296</span><span class="comment"> * @param len final string size (in bytes)</span></div>
<div class="line"><span class="lineno"> 1297</span><span class="comment"> * @param dot the decimal or tousand separator position</span></div>
<div class="line"><span class="lineno"> 1298</span><span class="comment"> * @param separator symbol &quot;.&quot; or &quot;,&quot;</span></div>
<div class="line"><span class="lineno"> 1299</span><span class="comment"> * @param remove_leading_zeros if true removes up to two leading zeros (default is true)</span></div>
<div class="line"><span class="lineno"> 1300</span><span class="comment"> */</span></div>
<div class="line"><a id="l01301" name="l01301"></a><span class="lineno"><a class="line" href="group___g05.html#ga0f40d75452088ceeffb4d8969fb34999"> 1301</a></span><span class="keywordtype">void</span> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g05.html#ga0f40d75452088ceeffb4d8969fb34999">convertToChar</a>(uint16_t value, <span class="keywordtype">char</span> *strValue, uint8_t len, uint8_t dot, uint8_t separator, <span class="keywordtype">bool</span> remove_leading_zeros)</div>
<div class="line"><a id="l01302" name="l01302"></a><span class="lineno"> 1302</span>{</div>
<div class="line"><a id="l01303" name="l01303"></a><span class="lineno"> 1303</span>    <span class="keywordtype">char</span> d;</div>
<div class="line"><a id="l01304" name="l01304"></a><span class="lineno"> 1304</span>    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = (len - 1); i &gt;= 0; i--)</div>
<div class="line"><a id="l01305" name="l01305"></a><span class="lineno"> 1305</span>    {</div>
<div class="line"><a id="l01306" name="l01306"></a><span class="lineno"> 1306</span>        d = value % 10;</div>
<div class="line"><a id="l01307" name="l01307"></a><span class="lineno"> 1307</span>        value = value / 10;</div>
<div class="line"><a id="l01308" name="l01308"></a><span class="lineno"> 1308</span>        strValue[i] = d + 48;</div>
<div class="line"><a id="l01309" name="l01309"></a><span class="lineno"> 1309</span>    }</div>
<div class="line"><a id="l01310" name="l01310"></a><span class="lineno"> 1310</span>    strValue[len] = <span class="stringliteral">&#39;\0&#39;</span>;</div>
<div class="line"><a id="l01311" name="l01311"></a><span class="lineno"> 1311</span>    <span class="keywordflow">if</span> (dot &gt; 0)</div>
<div class="line"><a id="l01312" name="l01312"></a><span class="lineno"> 1312</span>    {</div>
<div class="line"><a id="l01313" name="l01313"></a><span class="lineno"> 1313</span>        <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = len; i &gt;= dot; i--)</div>
<div class="line"><a id="l01314" name="l01314"></a><span class="lineno"> 1314</span>        {</div>
<div class="line"><a id="l01315" name="l01315"></a><span class="lineno"> 1315</span>            strValue[i + 1] = strValue[i];</div>
<div class="line"><a id="l01316" name="l01316"></a><span class="lineno"> 1316</span>        }</div>
<div class="line"><a id="l01317" name="l01317"></a><span class="lineno"> 1317</span>        strValue[dot] = separator;</div>
<div class="line"><a id="l01318" name="l01318"></a><span class="lineno"> 1318</span>    }</div>
<div class="line"><a id="l01319" name="l01319"></a><span class="lineno"> 1319</span> </div>
<div class="line"><a id="l01320" name="l01320"></a><span class="lineno"> 1320</span>    <span class="keywordflow">if</span> (remove_leading_zeros)</div>
<div class="line"><a id="l01321" name="l01321"></a><span class="lineno"> 1321</span>    {</div>
<div class="line"><a id="l01322" name="l01322"></a><span class="lineno"> 1322</span>        <span class="keywordflow">if</span> (strValue[0] == <span class="stringliteral">&#39;0&#39;</span>)</div>
<div class="line"><a id="l01323" name="l01323"></a><span class="lineno"> 1323</span>        {</div>
<div class="line"><a id="l01324" name="l01324"></a><span class="lineno"> 1324</span>            strValue[0] = <span class="stringliteral">&#39; &#39;</span>;</div>
<div class="line"><a id="l01325" name="l01325"></a><span class="lineno"> 1325</span>            <span class="keywordflow">if</span> (strValue[1] == <span class="stringliteral">&#39;0&#39;</span>)</div>
<div class="line"><a id="l01326" name="l01326"></a><span class="lineno"> 1326</span>                strValue[1] = <span class="stringliteral">&#39; &#39;</span>;</div>
<div class="line"><a id="l01327" name="l01327"></a><span class="lineno"> 1327</span>        }</div>
<div class="line"><a id="l01328" name="l01328"></a><span class="lineno"> 1328</span>    }</div>
<div class="line"><a id="l01329" name="l01329"></a><span class="lineno"> 1329</span>}</div>
<div class="line"><a id="l01330" name="l01330"></a><span class="lineno"> 1330</span> </div>
<div class="line"><a id="l01331" name="l01331"></a><span class="lineno"> 1331</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno"> 1332</span><span class="comment"> * @ingroup G05 Check the I2C buss address</span></div>
<div class="line"><span class="lineno"> 1333</span><span class="comment"> * @brief Check the I2C bus address</span></div>
<div class="line"><span class="lineno"> 1334</span><span class="comment"> *</span></div>
<div class="line"><span class="lineno"> 1335</span><span class="comment"> * @param uint8_t address Array - this array will be populated with the I2C bus addresses found (minimum three elements)</span></div>
<div class="line"><span class="lineno"> 1336</span><span class="comment"> * @return 0 if no i2c device is found; -1 if error is found or n &gt; 0, where n is the number of I2C bus address found</span></div>
<div class="line"><span class="lineno"> 1337</span><span class="comment"> */</span></div>
<div class="line"><a id="l01338" name="l01338"></a><span class="lineno"><a class="line" href="group___g05.html#ga16f6ef1f816a032fb07a91017c34bb50"> 1338</a></span><span class="keywordtype">int</span> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g05.html#ga16f6ef1f816a032fb07a91017c34bb50">checkI2C</a>(uint8_t *addressArray)</div>
<div class="line"><a id="l01339" name="l01339"></a><span class="lineno"> 1339</span>{</div>
<div class="line"><a id="l01340" name="l01340"></a><span class="lineno"> 1340</span>    Wire.begin();</div>
<div class="line"><a id="l01341" name="l01341"></a><span class="lineno"> 1341</span>    <span class="keywordtype">int</span> error, address;</div>
<div class="line"><a id="l01342" name="l01342"></a><span class="lineno"> 1342</span>    <span class="keywordtype">int</span> idx = 0;</div>
<div class="line"><a id="l01343" name="l01343"></a><span class="lineno"> 1343</span>    <span class="keywordflow">for</span> (address = 1; address &lt; 127; address++)</div>
<div class="line"><a id="l01344" name="l01344"></a><span class="lineno"> 1344</span>    {</div>
<div class="line"><a id="l01345" name="l01345"></a><span class="lineno"> 1345</span>        Wire.beginTransmission(address);</div>
<div class="line"><a id="l01346" name="l01346"></a><span class="lineno"> 1346</span>        error = Wire.endTransmission();</div>
<div class="line"><a id="l01347" name="l01347"></a><span class="lineno"> 1347</span>        <span class="keywordflow">if</span> (error == 0)</div>
<div class="line"><a id="l01348" name="l01348"></a><span class="lineno"> 1348</span>        {</div>
<div class="line"><a id="l01349" name="l01349"></a><span class="lineno"> 1349</span>            addressArray[idx] = address;</div>
<div class="line"><a id="l01350" name="l01350"></a><span class="lineno"> 1350</span>            idx++;</div>
<div class="line"><a id="l01351" name="l01351"></a><span class="lineno"> 1351</span>        }</div>
<div class="line"><a id="l01352" name="l01352"></a><span class="lineno"> 1352</span>        <span class="keywordflow">else</span> <span class="keywordflow">if</span> (error == 4)</div>
<div class="line"><a id="l01353" name="l01353"></a><span class="lineno"> 1353</span>            <span class="keywordflow">return</span> -1;</div>
<div class="line"><a id="l01354" name="l01354"></a><span class="lineno"> 1354</span>    }</div>
<div class="line"><a id="l01355" name="l01355"></a><span class="lineno"> 1355</span>    <span class="keywordflow">return</span> idx;</div>
<div class="line"><a id="l01356" name="l01356"></a><span class="lineno"> 1356</span>}</div>
<div class="line"><a id="l01357" name="l01357"></a><span class="lineno"> 1357</span> </div>
<div class="line"><a id="l01358" name="l01358"></a><span class="lineno"> 1358</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno"> 1359</span><span class="comment"> * @defgroup GA06 I2S Functions</span></div>
<div class="line"><span class="lineno"> 1360</span><span class="comment"> * @section  GA06 I2S</span></div>
<div class="line"><span class="lineno"> 1361</span><span class="comment"> * @details  When setting I2S_ENABLE (register 04) bit is high, the RDA5807FP can get the output signals SCK, WS, SD signals from GPIO3, GPIO1 and GPIO2 (I2S master)</span></div>
<div class="line"><span class="lineno"> 1362</span><span class="comment"> */</span></div>
<div class="line"><a id="l01363" name="l01363"></a><span class="lineno"> 1363</span> </div>
<div class="line"><a id="l01364" name="l01364"></a><span class="lineno"> 1364</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno"> 1365</span><span class="comment"> * @ingroup GA06 set I2S</span></div>
<div class="line"><span class="lineno"> 1366</span><span class="comment"> * @brief Configures all parameters for I2S</span></div>
<div class="line"><span class="lineno"> 1367</span><span class="comment"> * @details I2S setup must be enabled</span></div>
<div class="line"><span class="lineno"> 1368</span><span class="comment"> * @details I2S_SW_CNT can be: I2S_WS_STEP_48, I2S_WS_STEP_44_1, I2S_WS_STEP_32, I2S_WS_STEP_24, I2S_WS_STEP_22_05, I2S_WS_STEP_16, I2S_WS_STEP_12, I2S_WS_STEP_11_025 or I2S_WS_STEP_8</span></div>
<div class="line"><span class="lineno"> 1369</span><span class="comment"> *</span></div>
<div class="line"><span class="lineno"> 1370</span><span class="comment"> * @param R_DELY If 1, R channel data delay 1T</span></div>
<div class="line"><span class="lineno"> 1371</span><span class="comment"> * @param L_DELY If 1, L channel data delay 1T</span></div>
<div class="line"><span class="lineno"> 1372</span><span class="comment"> * @param SCLK_O_EDGE If 1, invert sclk output when as master</span></div>
<div class="line"><span class="lineno"> 1373</span><span class="comment"> * @param SW_O_EDGE If 1, invert ws output when as master</span></div>
<div class="line"><span class="lineno"> 1374</span><span class="comment"> * @param I2S_SW_CNT Only valid in master mode. See table above</span></div>
<div class="line"><span class="lineno"> 1375</span><span class="comment"> * @param WS_I_EDGE  If 0, use normal ws internally; If 1, inverte ws internally</span></div>
<div class="line"><span class="lineno"> 1376</span><span class="comment"> * @param DATA_SIGNED If 0, I2S output unsigned 16-bit audio data. If 1, I2S output signed 16-bit audio data.</span></div>
<div class="line"><span class="lineno"> 1377</span><span class="comment"> * @param SCLK_I_EDGE If 0, use normal sclk internally;If 1, inverte sclk internally</span></div>
<div class="line"><span class="lineno"> 1378</span><span class="comment"> * @param WS_LR Ws relation to l/r channel; If 0, ws=0 -&gt;r, ws=1 -&gt;l; If 1, ws=0 -&gt;l, ws=1 -&gt;r</span></div>
<div class="line"><span class="lineno"> 1379</span><span class="comment"> * @param SLAVE_MASTER I2S slave or master; 1 = slave; 0 = master</span></div>
<div class="line"><span class="lineno"> 1380</span><span class="comment"> * @param OPEN_MODE Open reserved register mode;  11=open behind registers writing function others: only open behind registers reading function</span></div>
<div class="line"><span class="lineno"> 1381</span><span class="comment"> *</span></div>
<div class="line"><span class="lineno"> 1382</span><span class="comment"> * @see RDA microelectronics RDA5807FP - SINGLE-CHIP BROADCAST FM RADIO TUNER pages 11 and 12</span></div>
<div class="line"><span class="lineno"> 1383</span><span class="comment"> *</span></div>
<div class="line"><span class="lineno"> 1384</span><span class="comment"> * @see setI2SOn</span></div>
<div class="line"><span class="lineno"> 1385</span><span class="comment"> */</span></div>
<div class="line"><a id="l01386" name="l01386"></a><span class="lineno"><a class="line" href="group___g_a06.html#ga2070bff9af95a523a77ac304eee7b22f"> 1386</a></span><span class="keywordtype">void</span> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a06.html#ga2070bff9af95a523a77ac304eee7b22f">setI2SAllParameters</a>(uint8_t R_DELY, uint8_t L_DELY, uint8_t SCLK_O_EDGE, uint8_t SW_O_EDGE, uint8_t I2S_SW_CNT, uint8_t WS_I_EDGE, uint8_t DATA_SIGNED, uint8_t SCLK_I_EDGE, uint8_t WS_LR, uint8_t SLAVE_MASTER, uint8_t OPEN_MODE)</div>
<div class="line"><a id="l01387" name="l01387"></a><span class="lineno"> 1387</span>{</div>
<div class="line"><a id="l01388" name="l01388"></a><span class="lineno"> 1388</span>    reg06-&gt;refined.R_DELY = R_DELY;</div>
<div class="line"><a id="l01389" name="l01389"></a><span class="lineno"> 1389</span>    reg06-&gt;refined.L_DELY = L_DELY;</div>
<div class="line"><a id="l01390" name="l01390"></a><span class="lineno"> 1390</span>    reg06-&gt;refined.SCLK_O_EDGE = SCLK_O_EDGE;</div>
<div class="line"><a id="l01391" name="l01391"></a><span class="lineno"> 1391</span>    reg06-&gt;refined.SW_O_EDGE = SW_O_EDGE;</div>
<div class="line"><a id="l01392" name="l01392"></a><span class="lineno"> 1392</span>    reg06-&gt;refined.I2S_SW_CNT = I2S_SW_CNT;</div>
<div class="line"><a id="l01393" name="l01393"></a><span class="lineno"> 1393</span>    reg06-&gt;refined.WS_I_EDGE = WS_I_EDGE;</div>
<div class="line"><a id="l01394" name="l01394"></a><span class="lineno"> 1394</span>    reg06-&gt;refined.DATA_SIGNED = DATA_SIGNED;</div>
<div class="line"><a id="l01395" name="l01395"></a><span class="lineno"> 1395</span>    reg06-&gt;refined.SCLK_I_EDGE = SCLK_I_EDGE;</div>
<div class="line"><a id="l01396" name="l01396"></a><span class="lineno"> 1396</span>    reg06-&gt;refined.WS_LR = WS_LR;</div>
<div class="line"><a id="l01397" name="l01397"></a><span class="lineno"> 1397</span>    reg06-&gt;refined.SLAVE_MASTER = SLAVE_MASTER;</div>
<div class="line"><a id="l01398" name="l01398"></a><span class="lineno"> 1398</span>    reg06-&gt;refined.OPEN_MODE = OPEN_MODE;</div>
<div class="line"><a id="l01399" name="l01399"></a><span class="lineno"> 1399</span> </div>
<div class="line"><a id="l01400" name="l01400"></a><span class="lineno"> 1400</span>    setRegister(<a class="code hl_define" href="_r_d_a5807_8h.html#ac5641e8e0c3254714bcd533a4b0111ca">REG06</a>, reg06-&gt;raw);</div>
<div class="line"><a id="l01401" name="l01401"></a><span class="lineno"> 1401</span>}</div>
<div class="line"><a id="l01402" name="l01402"></a><span class="lineno"> 1402</span> </div>
<div class="line"><a id="l01403" name="l01403"></a><span class="lineno"> 1403</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno"> 1404</span><span class="comment"> * @ingroup GA06 set I2S on or off</span></div>
<div class="line"><span class="lineno"> 1405</span><span class="comment"> * @brief Enables I2S setup</span></div>
<div class="line"><span class="lineno"> 1406</span><span class="comment"> * @details  When setting I2S_ENABLE (register 04) bit is high, the RDA5807FP you can get the output signals SCK, WS, SD signals from GPIO3, GPIO1 and  GPIO2 (I2S master)</span></div>
<div class="line"><span class="lineno"> 1407</span><span class="comment"> *</span></div>
<div class="line"><span class="lineno"> 1408</span><span class="comment"> * @param value  true or false</span></div>
<div class="line"><span class="lineno"> 1409</span><span class="comment"> */</span></div>
<div class="line"><a id="l01410" name="l01410"></a><span class="lineno"><a class="line" href="group___g_a06.html#gafe324014c135a510714e7d722f291273"> 1410</a></span><span class="keywordtype">void</span> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a06.html#gafe324014c135a510714e7d722f291273">setI2SOn</a>(<span class="keywordtype">bool</span> value)</div>
<div class="line"><a id="l01411" name="l01411"></a><span class="lineno"> 1411</span>{</div>
<div class="line"><a id="l01412" name="l01412"></a><span class="lineno"> 1412</span>    reg04-&gt;refined.I2S_ENABLE = value;</div>
<div class="line"><a id="l01413" name="l01413"></a><span class="lineno"> 1413</span>    setRegister(<a class="code hl_define" href="_r_d_a5807_8h.html#a88dee04c27a51e335798ab012dccbea1">REG04</a>, reg04-&gt;raw);</div>
<div class="line"><a id="l01414" name="l01414"></a><span class="lineno"> 1414</span>}</div>
<div class="line"><a id="l01415" name="l01415"></a><span class="lineno"> 1415</span> </div>
<div class="line"><a id="l01416" name="l01416"></a><span class="lineno"> 1416</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno"> 1417</span><span class="comment"> * @ingroup GA06 Sets I2S Slave or Master</span></div>
<div class="line"><span class="lineno"> 1418</span><span class="comment"> * @brief</span></div>
<div class="line"><span class="lineno"> 1419</span><span class="comment"> *</span></div>
<div class="line"><span class="lineno"> 1420</span><span class="comment"> * @param value  true or false</span></div>
<div class="line"><span class="lineno"> 1421</span><span class="comment"> */</span></div>
<div class="line"><a id="l01422" name="l01422"></a><span class="lineno"><a class="line" href="group___g_a06.html#ga70f086ccb3be49c4c51133bae2e8b113"> 1422</a></span><span class="keywordtype">void</span> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a06.html#ga70f086ccb3be49c4c51133bae2e8b113">setI2SMaster</a>(<span class="keywordtype">bool</span> value)</div>
<div class="line"><a id="l01423" name="l01423"></a><span class="lineno"> 1423</span>{</div>
<div class="line"><a id="l01424" name="l01424"></a><span class="lineno"> 1424</span>    reg06-&gt;refined.SLAVE_MASTER = !value;</div>
<div class="line"><a id="l01425" name="l01425"></a><span class="lineno"> 1425</span>    setRegister(<a class="code hl_define" href="_r_d_a5807_8h.html#ac5641e8e0c3254714bcd533a4b0111ca">REG06</a>, reg06-&gt;raw);</div>
<div class="line"><a id="l01426" name="l01426"></a><span class="lineno"> 1426</span>}</div>
<div class="line"><a id="l01427" name="l01427"></a><span class="lineno"> 1427</span> </div>
<div class="line"><a id="l01428" name="l01428"></a><span class="lineno"> 1428</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno"> 1429</span><span class="comment"> * @ingroup GA06 Sets I2S STEP/SPEED</span></div>
<div class="line"><span class="lineno"> 1430</span><span class="comment"> * @brief Sets the speed in kbps. You can use the predefined constantes: I2S_WS_STEP_48, I2S_WS_STEP_44_1, I2S_WS_STEP_32,</span></div>
<div class="line"><span class="lineno"> 1431</span><span class="comment"> * @brief I2S_WS_STEP_24, I2S_WS_STEP_22_05, I2S_WS_STEP_16, I2S_WS_STEP_12, I2S_WS_STEP_11_025 or I2S_WS_STEP_8</span></div>
<div class="line"><span class="lineno"> 1432</span><span class="comment"> *</span></div>
<div class="line"><span class="lineno"> 1433</span><span class="comment"> * @param value value</span></div>
<div class="line"><span class="lineno"> 1434</span><span class="comment"> */</span></div>
<div class="line"><a id="l01435" name="l01435"></a><span class="lineno"><a class="line" href="group___g_a06.html#ga3d5618cd755c0a56fea68ea589bb828f"> 1435</a></span><span class="keywordtype">void</span> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a06.html#ga3d5618cd755c0a56fea68ea589bb828f">setI2SSpeed</a>(uint8_t value)</div>
<div class="line"><a id="l01436" name="l01436"></a><span class="lineno"> 1436</span>{</div>
<div class="line"><a id="l01437" name="l01437"></a><span class="lineno"> 1437</span>    reg06-&gt;refined.I2S_SW_CNT = value;</div>
<div class="line"><a id="l01438" name="l01438"></a><span class="lineno"> 1438</span>    setRegister(<a class="code hl_define" href="_r_d_a5807_8h.html#ac5641e8e0c3254714bcd533a4b0111ca">REG06</a>, reg06-&gt;raw);</div>
<div class="line"><a id="l01439" name="l01439"></a><span class="lineno"> 1439</span>}</div>
<div class="line"><a id="l01440" name="l01440"></a><span class="lineno"> 1440</span> </div>
<div class="line"><a id="l01441" name="l01441"></a><span class="lineno"> 1441</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno"> 1442</span><span class="comment"> * @ingroup GA06 Sets I2S Data Signed</span></div>
<div class="line"><span class="lineno"> 1443</span><span class="comment"> * @brief If 0, I2S output unsigned 16-bit audio data. If 1, I2S output signed 16-bit audio data.</span></div>
<div class="line"><span class="lineno"> 1444</span><span class="comment"> *</span></div>
<div class="line"><span class="lineno"> 1445</span><span class="comment"> * @param value  true (1) or false (0)</span></div>
<div class="line"><span class="lineno"> 1446</span><span class="comment"> */</span></div>
<div class="line"><a id="l01447" name="l01447"></a><span class="lineno"><a class="line" href="group___g_a06.html#gabeb9446fc371fe58e075bea7ebc51fdb"> 1447</a></span><span class="keywordtype">void</span> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a06.html#gabeb9446fc371fe58e075bea7ebc51fdb">setI2SDataSigned</a>(<span class="keywordtype">bool</span> value)</div>
<div class="line"><a id="l01448" name="l01448"></a><span class="lineno"> 1448</span>{</div>
<div class="line"><a id="l01449" name="l01449"></a><span class="lineno"> 1449</span>    reg06-&gt;refined.DATA_SIGNED = value;</div>
<div class="line"><a id="l01450" name="l01450"></a><span class="lineno"> 1450</span>    setRegister(<a class="code hl_define" href="_r_d_a5807_8h.html#ac5641e8e0c3254714bcd533a4b0111ca">REG06</a>, reg06-&gt;raw);</div>
<div class="line"><a id="l01451" name="l01451"></a><span class="lineno"> 1451</span>}</div>
<div class="line"><a id="l01452" name="l01452"></a><span class="lineno"> 1452</span> </div>
<div class="line"><a id="l01453" name="l01453"></a><span class="lineno"> 1453</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno"> 1454</span><span class="comment"> * @defgroup GA07 Audio Functions</span></div>
<div class="line"><span class="lineno"> 1455</span><span class="comment"> * @section  GA07 Audio</span></div>
<div class="line"><span class="lineno"> 1456</span><span class="comment"> */</span></div>
<div class="line"><a id="l01457" name="l01457"></a><span class="lineno"> 1457</span> </div>
<div class="line"><a id="l01458" name="l01458"></a><span class="lineno"> 1458</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno"> 1459</span><span class="comment"> * @ingroup GA07</span></div>
<div class="line"><span class="lineno"> 1460</span><span class="comment"> * @brief Sets Soft Mute Enable or disable</span></div>
<div class="line"><span class="lineno"> 1461</span><span class="comment"> * @param value true = enable; false=disable</span></div>
<div class="line"><span class="lineno"> 1462</span><span class="comment"> */</span></div>
<div class="line"><a id="l01463" name="l01463"></a><span class="lineno"><a class="line" href="group___g_a07.html#gadd2c2ab8b861ab0714fdeb99c774d656"> 1463</a></span><span class="keywordtype">void</span> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a07.html#gadd2c2ab8b861ab0714fdeb99c774d656">setSoftmute</a>(<span class="keywordtype">bool</span> value)</div>
<div class="line"><a id="l01464" name="l01464"></a><span class="lineno"> 1464</span>{</div>
<div class="line"><a id="l01465" name="l01465"></a><span class="lineno"> 1465</span>    reg04-&gt;refined.SOFTMUTE_EN = value;</div>
<div class="line"><a id="l01466" name="l01466"></a><span class="lineno"> 1466</span>    setRegister(<a class="code hl_define" href="_r_d_a5807_8h.html#a88dee04c27a51e335798ab012dccbea1">REG04</a>, reg04-&gt;raw);</div>
<div class="line"><a id="l01467" name="l01467"></a><span class="lineno"> 1467</span>}</div>
<div class="line"><a id="l01468" name="l01468"></a><span class="lineno"> 1468</span> </div>
<div class="line"><a id="l01469" name="l01469"></a><span class="lineno"> 1469</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno"> 1470</span><span class="comment"> * @ingroup GA07</span></div>
<div class="line"><span class="lineno"> 1471</span><span class="comment"> * @brief Sets Audio mute or unmute</span></div>
<div class="line"><span class="lineno"> 1472</span><span class="comment"> * @param value TRUE = mute; FALSE = unmute</span></div>
<div class="line"><span class="lineno"> 1473</span><span class="comment"> */</span></div>
<div class="line"><a id="l01474" name="l01474"></a><span class="lineno"><a class="line" href="group___g_a07.html#gafec3018913d735ee0684b88cf503c84a"> 1474</a></span><span class="keywordtype">void</span> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a07.html#gafec3018913d735ee0684b88cf503c84a">setMute</a>(<span class="keywordtype">bool</span> value)</div>
<div class="line"><a id="l01475" name="l01475"></a><span class="lineno"> 1475</span>{</div>
<div class="line"><a id="l01476" name="l01476"></a><span class="lineno"> 1476</span>    reg02-&gt;refined.SEEK = 0;</div>
<div class="line"><a id="l01477" name="l01477"></a><span class="lineno"> 1477</span>    reg02-&gt;refined.DMUTE = !value; <span class="comment">// 1 = Normal operation; 0 = Mute</span></div>
<div class="line"><a id="l01478" name="l01478"></a><span class="lineno"> 1478</span>    setRegister(<a class="code hl_define" href="_r_d_a5807_8h.html#a09a3d3fef9f53f0dbe1dd0072f02c1d4">REG02</a>, reg02-&gt;raw);</div>
<div class="line"><a id="l01479" name="l01479"></a><span class="lineno"> 1479</span>}</div>
<div class="line"><a id="l01480" name="l01480"></a><span class="lineno"> 1480</span> </div>
<div class="line"><a id="l01481" name="l01481"></a><span class="lineno"> 1481</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno"> 1482</span><span class="comment"> * @ingroup GA07</span></div>
<div class="line"><span class="lineno"> 1483</span><span class="comment"> * @brief Sets audio output impedance high ow low</span></div>
<div class="line"><span class="lineno"> 1484</span><span class="comment"> * @details Useful to setup high impedance headphones </span></div>
<div class="line"><span class="lineno"> 1485</span><span class="comment"> * @param value TRUE = High; FALSE = Low</span></div>
<div class="line"><span class="lineno"> 1486</span><span class="comment"> */</span></div>
<div class="line"><a id="l01487" name="l01487"></a><span class="lineno"><a class="line" href="group___g_a07.html#gaabd554f39778bf6d81712df0ea72d0fa"> 1487</a></span><span class="keywordtype">void</span> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a07.html#gaabd554f39778bf6d81712df0ea72d0fa">setAudioOutputHighImpedance</a>(<span class="keywordtype">bool</span> value)</div>
<div class="line"><a id="l01488" name="l01488"></a><span class="lineno"> 1488</span>{</div>
<div class="line"><a id="l01489" name="l01489"></a><span class="lineno"> 1489</span>    reg02-&gt;refined.SEEK = 0;</div>
<div class="line"><a id="l01490" name="l01490"></a><span class="lineno"> 1490</span>    reg02-&gt;refined.DHIZ = !value; <span class="comment">// 0 = High impedance; 1 = Normal operation</span></div>
<div class="line"><a id="l01491" name="l01491"></a><span class="lineno"> 1491</span>    setRegister(<a class="code hl_define" href="_r_d_a5807_8h.html#a09a3d3fef9f53f0dbe1dd0072f02c1d4">REG02</a>, reg02-&gt;raw);</div>
<div class="line"><a id="l01492" name="l01492"></a><span class="lineno"> 1492</span>}</div>
<div class="line"><a id="l01493" name="l01493"></a><span class="lineno"> 1493</span> </div>
<div class="line"><a id="l01494" name="l01494"></a><span class="lineno"> 1494</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno"> 1495</span><span class="comment"> * @ingroup GA07</span></div>
<div class="line"><span class="lineno"> 1496</span><span class="comment"> * @brief Sets audio Mono or stereo</span></div>
<div class="line"><span class="lineno"> 1497</span><span class="comment"> *</span></div>
<div class="line"><span class="lineno"> 1498</span><span class="comment"> * @param value TRUE = Mono; FALSE force stereo</span></div>
<div class="line"><span class="lineno"> 1499</span><span class="comment"> */</span></div>
<div class="line"><a id="l01500" name="l01500"></a><span class="lineno"><a class="line" href="group___g_a07.html#gad6e77ffbeb3f4dc885548130e09590d6"> 1500</a></span><span class="keywordtype">void</span> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a07.html#gad6e77ffbeb3f4dc885548130e09590d6">setMono</a>(<span class="keywordtype">bool</span> value)</div>
<div class="line"><a id="l01501" name="l01501"></a><span class="lineno"> 1501</span>{</div>
<div class="line"><a id="l01502" name="l01502"></a><span class="lineno"> 1502</span>    reg02-&gt;refined.SEEK = 0;</div>
<div class="line"><a id="l01503" name="l01503"></a><span class="lineno"> 1503</span>    reg02-&gt;refined.MONO = value;</div>
<div class="line"><a id="l01504" name="l01504"></a><span class="lineno"> 1504</span>    setRegister(<a class="code hl_define" href="_r_d_a5807_8h.html#a09a3d3fef9f53f0dbe1dd0072f02c1d4">REG02</a>, reg02-&gt;raw);</div>
<div class="line"><a id="l01505" name="l01505"></a><span class="lineno"> 1505</span>}</div>
<div class="line"><a id="l01506" name="l01506"></a><span class="lineno"> 1506</span> </div>
<div class="line"><a id="l01507" name="l01507"></a><span class="lineno"> 1507</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno"> 1508</span><span class="comment"> * @ingroup GA07</span></div>
<div class="line"><span class="lineno"> 1509</span><span class="comment"> * @brief Sets Bass Boost</span></div>
<div class="line"><span class="lineno"> 1510</span><span class="comment"> *</span></div>
<div class="line"><span class="lineno"> 1511</span><span class="comment"> * @param value FALSE = Disable; TRUE = Enable</span></div>
<div class="line"><span class="lineno"> 1512</span><span class="comment"> */</span></div>
<div class="line"><a id="l01513" name="l01513"></a><span class="lineno"><a class="line" href="group___g_a07.html#ga8002bb394ef19db02e04a39de04dffc5"> 1513</a></span><span class="keywordtype">void</span> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a07.html#ga8002bb394ef19db02e04a39de04dffc5">setBass</a>(<span class="keywordtype">bool</span> value)</div>
<div class="line"><a id="l01514" name="l01514"></a><span class="lineno"> 1514</span>{</div>
<div class="line"><a id="l01515" name="l01515"></a><span class="lineno"> 1515</span>    reg02-&gt;refined.SEEK = 0;</div>
<div class="line"><a id="l01516" name="l01516"></a><span class="lineno"> 1516</span>    reg02-&gt;refined.BASS = value;</div>
<div class="line"><a id="l01517" name="l01517"></a><span class="lineno"> 1517</span>    setRegister(<a class="code hl_define" href="_r_d_a5807_8h.html#a09a3d3fef9f53f0dbe1dd0072f02c1d4">REG02</a>, reg02-&gt;raw);</div>
<div class="line"><a id="l01518" name="l01518"></a><span class="lineno"> 1518</span>}</div>
<div class="line"><a id="l01519" name="l01519"></a><span class="lineno"> 1519</span> </div>
<div class="line"><a id="l01520" name="l01520"></a><span class="lineno"> 1520</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno"> 1521</span><span class="comment"> * @ingroup GA07</span></div>
<div class="line"><span class="lineno"> 1522</span><span class="comment"> * @brief Gets the current Stereo status</span></div>
<div class="line"><span class="lineno"> 1523</span><span class="comment"> *</span></div>
<div class="line"><span class="lineno"> 1524</span><span class="comment"> * @return TRUE if stereo;</span></div>
<div class="line"><span class="lineno"> 1525</span><span class="comment"> */</span></div>
<div class="line"><a id="l01526" name="l01526"></a><span class="lineno"><a class="line" href="group___g_a07.html#ga250ff3788a7831dae3c6200919b446dd"> 1526</a></span><span class="keywordtype">bool</span> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a07.html#ga250ff3788a7831dae3c6200919b446dd">isStereo</a>()</div>
<div class="line"><a id="l01527" name="l01527"></a><span class="lineno"> 1527</span>{</div>
<div class="line"><a id="l01528" name="l01528"></a><span class="lineno"> 1528</span>    getStatus(<a class="code hl_define" href="_r_d_a5807_8h.html#a5ec596211175cecd682755f5e996b6dd">REG0A</a>);</div>
<div class="line"><a id="l01529" name="l01529"></a><span class="lineno"> 1529</span>    <span class="keywordflow">return</span> reg0a-&gt;refined.ST;</div>
<div class="line"><a id="l01530" name="l01530"></a><span class="lineno"> 1530</span>}</div>
<div class="line"><a id="l01531" name="l01531"></a><span class="lineno"> 1531</span> </div>
<div class="line"><a id="l01532" name="l01532"></a><span class="lineno"> 1532</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno"> 1533</span><span class="comment"> * @ingroup GA07</span></div>
<div class="line"><span class="lineno"> 1534</span><span class="comment"> * @brief Sets the audio volume level</span></div>
<div class="line"><span class="lineno"> 1535</span><span class="comment"> * @details You can use values between 0 and 15. </span></div>
<div class="line"><span class="lineno"> 1536</span><span class="comment"> * @code {.cpp}</span></div>
<div class="line"><span class="lineno"> 1537</span><span class="comment"> * #include &lt;RDA5807.h&gt;</span></div>
<div class="line"><span class="lineno"> 1538</span><span class="comment"> * RDA5807 rx;</span></div>
<div class="line"><span class="lineno"> 1539</span><span class="comment"> * void setup() {</span></div>
<div class="line"><span class="lineno"> 1540</span><span class="comment"> *   pinMode(4, INPUT_PULLUP); // Arduino pin 4 - Volume Up</span></div>
<div class="line"><span class="lineno"> 1541</span><span class="comment"> *   pinMode(5, INPUT_PULLUP); // Arduino pin 5 - Volume Down</span></div>
<div class="line"><span class="lineno"> 1542</span><span class="comment"> *   rx.setup();</span></div>
<div class="line"><span class="lineno"> 1543</span><span class="comment"> *   rx.setFrequency(10390); // Tunes at 103.9 MHz</span></div>
<div class="line"><span class="lineno"> 1544</span><span class="comment"> *   rx.setVolume(7);</span></div>
<div class="line"><span class="lineno"> 1545</span><span class="comment"> * }</span></div>
<div class="line"><span class="lineno"> 1546</span><span class="comment"> * void loop() {</span></div>
<div class="line"><span class="lineno"> 1547</span><span class="comment"> *   if (digitalRead(4) == LOW) rx.setVolumeUp();</span></div>
<div class="line"><span class="lineno"> 1548</span><span class="comment"> *   if (digitalRead(5) == LOW) rx.setVolumeDown();</span></div>
<div class="line"><span class="lineno"> 1549</span><span class="comment"> *   delay(200);</span></div>
<div class="line"><span class="lineno"> 1550</span><span class="comment"> * }</span></div>
<div class="line"><span class="lineno"> 1551</span><span class="comment"> * @endcode</span></div>
<div class="line"><span class="lineno"> 1552</span><span class="comment"> * </span></div>
<div class="line"><span class="lineno"> 1553</span><span class="comment"> * @param value (from 0 to 15)</span></div>
<div class="line"><span class="lineno"> 1554</span><span class="comment"> * @see setVolumeUp, setVolumeDown, setMute, getVolume</span></div>
<div class="line"><span class="lineno"> 1555</span><span class="comment"> */</span></div>
<div class="line"><a id="l01556" name="l01556"></a><span class="lineno"><a class="line" href="group___g_a07.html#ga51bf4344ebeb44f7170265901df870f5"> 1556</a></span><span class="keywordtype">void</span> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a07.html#ga51bf4344ebeb44f7170265901df870f5">setVolume</a>(uint8_t value)</div>
<div class="line"><a id="l01557" name="l01557"></a><span class="lineno"> 1557</span>{</div>
<div class="line"><a id="l01558" name="l01558"></a><span class="lineno"> 1558</span>    <span class="keywordflow">if</span> (value &gt; 15)</div>
<div class="line"><a id="l01559" name="l01559"></a><span class="lineno"> 1559</span>        value = 15;</div>
<div class="line"><a id="l01560" name="l01560"></a><span class="lineno"> 1560</span> </div>
<div class="line"><a id="l01561" name="l01561"></a><span class="lineno"> 1561</span>    reg05-&gt;refined.VOLUME = <span class="keyword">this</span>-&gt;currentVolume = value;</div>
<div class="line"><a id="l01562" name="l01562"></a><span class="lineno"> 1562</span>    setRegister(<a class="code hl_define" href="_r_d_a5807_8h.html#a848ac333ddfea97bc1f16a2e69eaf953">REG05</a>, reg05-&gt;raw);</div>
<div class="line"><a id="l01563" name="l01563"></a><span class="lineno"> 1563</span>}</div>
<div class="line"><a id="l01564" name="l01564"></a><span class="lineno"> 1564</span> </div>
<div class="line"><a id="l01565" name="l01565"></a><span class="lineno"> 1565</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno"> 1566</span><span class="comment"> * @ingroup GA07</span></div>
<div class="line"><span class="lineno"> 1567</span><span class="comment"> * @brief Gets the current audio volume level</span></div>
<div class="line"><span class="lineno"> 1568</span><span class="comment"> *</span></div>
<div class="line"><span class="lineno"> 1569</span><span class="comment"> * @return uint8_t  0 to 15</span></div>
<div class="line"><span class="lineno"> 1570</span><span class="comment"> */</span></div>
<div class="line"><a id="l01571" name="l01571"></a><span class="lineno"><a class="line" href="group___g_a07.html#ga743d91d820922b3feda10d06443bc8a9"> 1571</a></span><a class="code hl_function" href="group___g_a07.html#ga743d91d820922b3feda10d06443bc8a9">uint8_t</a> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a07.html#ga743d91d820922b3feda10d06443bc8a9">getVolume</a>()</div>
<div class="line"><a id="l01572" name="l01572"></a><span class="lineno"> 1572</span>{</div>
<div class="line"><a id="l01573" name="l01573"></a><span class="lineno"> 1573</span>    <span class="keywordflow">return</span> <span class="keyword">this</span>-&gt;currentVolume;</div>
<div class="line"><a id="l01574" name="l01574"></a><span class="lineno"> 1574</span>}</div>
<div class="line"><a id="l01575" name="l01575"></a><span class="lineno"> 1575</span> </div>
<div class="line"><a id="l01576" name="l01576"></a><span class="lineno"> 1576</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno"> 1577</span><span class="comment"> * @ingroup GA07</span></div>
<div class="line"><span class="lineno"> 1578</span><span class="comment"> * @brief Increments the audio volume</span></div>
<div class="line"><span class="lineno"> 1579</span><span class="comment"> *</span></div>
<div class="line"><span class="lineno"> 1580</span><span class="comment"> */</span></div>
<div class="line"><a id="l01581" name="l01581"></a><span class="lineno"><a class="line" href="group___g_a07.html#ga864af32df4d3365e03f8876703218283"> 1581</a></span><span class="keywordtype">void</span> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a07.html#ga864af32df4d3365e03f8876703218283">setVolumeUp</a>()</div>
<div class="line"><a id="l01582" name="l01582"></a><span class="lineno"> 1582</span>{</div>
<div class="line"><a id="l01583" name="l01583"></a><span class="lineno"> 1583</span>    <span class="keywordflow">if</span> (<span class="keyword">this</span>-&gt;currentVolume &lt; 15)</div>
<div class="line"><a id="l01584" name="l01584"></a><span class="lineno"> 1584</span>    {</div>
<div class="line"><a id="l01585" name="l01585"></a><span class="lineno"> 1585</span>        <span class="keyword">this</span>-&gt;currentVolume++;</div>
<div class="line"><a id="l01586" name="l01586"></a><span class="lineno"> 1586</span>        setVolume(<span class="keyword">this</span>-&gt;currentVolume);</div>
<div class="line"><a id="l01587" name="l01587"></a><span class="lineno"> 1587</span>    }</div>
<div class="line"><a id="l01588" name="l01588"></a><span class="lineno"> 1588</span>}</div>
<div class="line"><a id="l01589" name="l01589"></a><span class="lineno"> 1589</span> </div>
<div class="line"><a id="l01590" name="l01590"></a><span class="lineno"> 1590</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno"> 1591</span><span class="comment"> * @ingroup GA07</span></div>
<div class="line"><span class="lineno"> 1592</span><span class="comment"> * @brief Decrements the audio volume</span></div>
<div class="line"><span class="lineno"> 1593</span><span class="comment"> *</span></div>
<div class="line"><span class="lineno"> 1594</span><span class="comment"> */</span></div>
<div class="line"><a id="l01595" name="l01595"></a><span class="lineno"><a class="line" href="group___g_a07.html#ga910965f74897b0246a0b3bed39743d8c"> 1595</a></span><span class="keywordtype">void</span> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a07.html#ga910965f74897b0246a0b3bed39743d8c">setVolumeDown</a>()</div>
<div class="line"><a id="l01596" name="l01596"></a><span class="lineno"> 1596</span>{</div>
<div class="line"><a id="l01597" name="l01597"></a><span class="lineno"> 1597</span>    <span class="keywordflow">if</span> (<span class="keyword">this</span>-&gt;currentVolume &gt; 0)</div>
<div class="line"><a id="l01598" name="l01598"></a><span class="lineno"> 1598</span>    {</div>
<div class="line"><a id="l01599" name="l01599"></a><span class="lineno"> 1599</span>        <span class="keyword">this</span>-&gt;currentVolume--;</div>
<div class="line"><a id="l01600" name="l01600"></a><span class="lineno"> 1600</span>        setVolume(<span class="keyword">this</span>-&gt;currentVolume);</div>
<div class="line"><a id="l01601" name="l01601"></a><span class="lineno"> 1601</span>    }</div>
<div class="line"><a id="l01602" name="l01602"></a><span class="lineno"> 1602</span>}</div>
<div class="line"><a id="l01603" name="l01603"></a><span class="lineno"> 1603</span> </div>
<div class="line"><a id="l01604" name="l01604"></a><span class="lineno"> 1604</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno"> 1605</span><span class="comment"> * @defgroup GA08 LNA setup and Signal status</span></div>
<div class="line"><span class="lineno"> 1606</span><span class="comment"> * @section  GA08 LNA and Signal</span></div>
<div class="line"><span class="lineno"> 1607</span><span class="comment"> */</span></div>
<div class="line"><a id="l01608" name="l01608"></a><span class="lineno"> 1608</span> </div>
<div class="line"><a id="l01609" name="l01609"></a><span class="lineno"> 1609</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno"> 1610</span><span class="comment"> * @ingroup GA08</span></div>
<div class="line"><span class="lineno"> 1611</span><span class="comment"> * @brief Sets  LNA_ICSEL_BIT</span></div>
<div class="line"><span class="lineno"> 1612</span><span class="comment"> * @details Lna working current bit: 0=1.8mA; 1=2.1mA; 2=2.5mA; 3=3.0mA (default 0).</span></div>
<div class="line"><span class="lineno"> 1613</span><span class="comment"> * @param value  - 0=1.8mA; 1=2.1mA; 2=2.5mA; 3=3.0mA</span></div>
<div class="line"><span class="lineno"> 1614</span><span class="comment"> */</span></div>
<div class="line"><a id="l01615" name="l01615"></a><span class="lineno"><a class="line" href="group___g_a08.html#ga35428e147462af6490c382acdf769173"> 1615</a></span><span class="keywordtype">void</span> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a08.html#ga35428e147462af6490c382acdf769173">setLnaIcSel</a>(uint8_t value)</div>
<div class="line"><a id="l01616" name="l01616"></a><span class="lineno"> 1616</span>{</div>
<div class="line"><a id="l01617" name="l01617"></a><span class="lineno"> 1617</span>    reg05-&gt;refined.LNA_ICSEL_BIT = value;</div>
<div class="line"><a id="l01618" name="l01618"></a><span class="lineno"> 1618</span>    setRegister(<a class="code hl_define" href="_r_d_a5807_8h.html#a848ac333ddfea97bc1f16a2e69eaf953">REG05</a>, reg05-&gt;raw);</div>
<div class="line"><a id="l01619" name="l01619"></a><span class="lineno"> 1619</span>}</div>
<div class="line"><a id="l01620" name="l01620"></a><span class="lineno"> 1620</span> </div>
<div class="line"><a id="l01621" name="l01621"></a><span class="lineno"> 1621</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno"> 1622</span><span class="comment"> * @ingroup GA08</span></div>
<div class="line"><span class="lineno"> 1623</span><span class="comment"> * @brief Sets LNA input port selection bit</span></div>
<div class="line"><span class="lineno"> 1624</span><span class="comment"> * @details YOu can select: 0 = no input; 1 = LNAN; 2 = LNAP; 3: dual port input</span></div>
<div class="line"><span class="lineno"> 1625</span><span class="comment"> * @param value  - 0 = no input; 1 = LNAN; 2 = LNAP; 3: dual port input</span></div>
<div class="line"><span class="lineno"> 1626</span><span class="comment"> */</span></div>
<div class="line"><a id="l01627" name="l01627"></a><span class="lineno"><a class="line" href="group___g_a08.html#gaf595aab626e55ab733af8682674faa61"> 1627</a></span><span class="keywordtype">void</span> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a08.html#gaf595aab626e55ab733af8682674faa61">setLnaPortSel</a>(uint8_t value)</div>
<div class="line"><a id="l01628" name="l01628"></a><span class="lineno"> 1628</span>{</div>
<div class="line"><a id="l01629" name="l01629"></a><span class="lineno"> 1629</span>    reg05-&gt;refined.LNA_PORT_SEL = value;</div>
<div class="line"><a id="l01630" name="l01630"></a><span class="lineno"> 1630</span>    setRegister(<a class="code hl_define" href="_r_d_a5807_8h.html#a848ac333ddfea97bc1f16a2e69eaf953">REG05</a>, reg05-&gt;raw);</div>
<div class="line"><a id="l01631" name="l01631"></a><span class="lineno"> 1631</span>}</div>
<div class="line"><a id="l01632" name="l01632"></a><span class="lineno"> 1632</span> </div>
<div class="line"><a id="l01633" name="l01633"></a><span class="lineno"> 1633</span><span class="comment">/**</span></div>
<div class="line"><span class="lineno"> 1634</span><span class="comment"> * @ingroup GA08</span></div>
<div class="line"><span class="lineno"> 1635</span><span class="comment"> * @brief Gets the current Rssi</span></div>
<div class="line"><span class="lineno"> 1636</span><span class="comment"> * @details RSSI; 000000 = min; 111111 = max; RSSI scale is logarithmic.</span></div>
<div class="line"><span class="lineno"> 1637</span><span class="comment"> *</span></div>
<div class="line"><span class="lineno"> 1638</span><span class="comment"> * @return int</span></div>
<div class="line"><span class="lineno"> 1639</span><span class="comment"> */</span></div>
<div class="line"><a id="l01640" name="l01640"></a><span class="lineno"><a class="line" href="group___g_a08.html#ga4bd7597d4c9090b04486aec21a6a0a5d"> 1640</a></span><span class="keywordtype">int</span> <a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a>::<a class="code hl_function" href="group___g_a08.html#ga4bd7597d4c9090b04486aec21a6a0a5d">getRssi</a>()</div>
<div class="line"><a id="l01641" name="l01641"></a><span class="lineno"> 1641</span>{</div>
<div class="line"><a id="l01642" name="l01642"></a><span class="lineno"> 1642</span>    getStatus(<a class="code hl_define" href="_r_d_a5807_8h.html#a76c73d8e23848f8d73679450c2d7264b">REG0B</a>);</div>
<div class="line"><a id="l01643" name="l01643"></a><span class="lineno"> 1643</span>    <span class="keywordflow">return</span> reg0b-&gt;refined.RSSI;</div>
<div class="line"><a id="l01644" name="l01644"></a><span class="lineno"> 1644</span>}</div>
<div class="ttc" id="a_r_d_a5807_8h_html_a09a3d3fef9f53f0dbe1dd0072f02c1d4"><div class="ttname"><a href="_r_d_a5807_8h.html#a09a3d3fef9f53f0dbe1dd0072f02c1d4">REG02</a></div><div class="ttdeci">#define REG02</div><div class="ttdoc">Register 0x02.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8h_source.html#l00063">RDA5807.h:63</a></div></div>
<div class="ttc" id="a_r_d_a5807_8h_html_a2a41df49654ae321f569bfabfa74de24"><div class="ttname"><a href="_r_d_a5807_8h.html#a2a41df49654ae321f569bfabfa74de24">REG07</a></div><div class="ttdeci">#define REG07</div><div class="ttdoc">Register 0x07.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8h_source.html#l00068">RDA5807.h:68</a></div></div>
<div class="ttc" id="a_r_d_a5807_8h_html_a5ec596211175cecd682755f5e996b6dd"><div class="ttname"><a href="_r_d_a5807_8h.html#a5ec596211175cecd682755f5e996b6dd">REG0A</a></div><div class="ttdeci">#define REG0A</div><div class="ttdoc">Register 0x0A.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8h_source.html#l00070">RDA5807.h:70</a></div></div>
<div class="ttc" id="a_r_d_a5807_8h_html_a76c73d8e23848f8d73679450c2d7264b"><div class="ttname"><a href="_r_d_a5807_8h.html#a76c73d8e23848f8d73679450c2d7264b">REG0B</a></div><div class="ttdeci">#define REG0B</div><div class="ttdoc">Register 0x0B.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8h_source.html#l00071">RDA5807.h:71</a></div></div>
<div class="ttc" id="a_r_d_a5807_8h_html_a848ac333ddfea97bc1f16a2e69eaf953"><div class="ttname"><a href="_r_d_a5807_8h.html#a848ac333ddfea97bc1f16a2e69eaf953">REG05</a></div><div class="ttdeci">#define REG05</div><div class="ttdoc">Register 0x05.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8h_source.html#l00066">RDA5807.h:66</a></div></div>
<div class="ttc" id="a_r_d_a5807_8h_html_a88dee04c27a51e335798ab012dccbea1"><div class="ttname"><a href="_r_d_a5807_8h.html#a88dee04c27a51e335798ab012dccbea1">REG04</a></div><div class="ttdeci">#define REG04</div><div class="ttdoc">Register 0x04.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8h_source.html#l00065">RDA5807.h:65</a></div></div>
<div class="ttc" id="a_r_d_a5807_8h_html_a96f1c217ac648e08bc64dd3b9086612c"><div class="ttname"><a href="_r_d_a5807_8h.html#a96f1c217ac648e08bc64dd3b9086612c">REG08</a></div><div class="ttdeci">#define REG08</div><div class="ttdoc">Register 0x08.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8h_source.html#l00069">RDA5807.h:69</a></div></div>
<div class="ttc" id="a_r_d_a5807_8h_html_ac2446f96334b533154259a21c13950e6"><div class="ttname"><a href="_r_d_a5807_8h.html#ac2446f96334b533154259a21c13950e6">REG03</a></div><div class="ttdeci">#define REG03</div><div class="ttdoc">Register 0x03.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8h_source.html#l00064">RDA5807.h:64</a></div></div>
<div class="ttc" id="a_r_d_a5807_8h_html_ac5641e8e0c3254714bcd533a4b0111ca"><div class="ttname"><a href="_r_d_a5807_8h.html#ac5641e8e0c3254714bcd533a4b0111ca">REG06</a></div><div class="ttdeci">#define REG06</div><div class="ttdoc">Register 0x06.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8h_source.html#l00067">RDA5807.h:67</a></div></div>
<div class="ttc" id="agroup___g05_html_ga0f40d75452088ceeffb4d8969fb34999"><div class="ttname"><a href="group___g05.html#ga0f40d75452088ceeffb4d8969fb34999">RDA5807::convertToChar</a></div><div class="ttdeci">void convertToChar(uint16_t value, char *strValue, uint8_t len, uint8_t dot, uint8_t separator, bool remove_leading_zeros=true)</div><div class="ttdoc">Converts a number to a char array.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l01301">RDA5807.cpp:1301</a></div></div>
<div class="ttc" id="agroup___g05_html_ga16f6ef1f816a032fb07a91017c34bb50"><div class="ttname"><a href="group___g05.html#ga16f6ef1f816a032fb07a91017c34bb50">RDA5807::checkI2C</a></div><div class="ttdeci">int checkI2C(uint8_t *addressArray)</div><div class="ttdoc">Check the I2C bus address.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l01338">RDA5807.cpp:1338</a></div></div>
<div class="ttc" id="agroup___g_a01_html_a01973fd833000d82609206bfbef62977"><div class="ttname"><a href="group___g_a01.html#a01973fd833000d82609206bfbef62977">RDA5807::rds_buffer0A</a></div><div class="ttdeci">char rds_buffer0A[9]</div><div class="ttdoc">PS - RDS Basic tuning and switching information (Type 0 groups) - Station Name.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8h_source.html#l00599">RDA5807.h:599</a></div></div>
<div class="ttc" id="agroup___g_a01_html_a3d9eae606a7de8a650611eaf1f9a8482"><div class="ttname"><a href="group___g_a01.html#a3d9eae606a7de8a650611eaf1f9a8482">RDA5807::rds_time</a></div><div class="ttdeci">char rds_time[25]</div><div class="ttdoc">CT - RDS date time received information - UTC Time.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8h_source.html#l00600">RDA5807.h:600</a></div></div>
<div class="ttc" id="agroup___g_a01_html_a81d7aaf8d628afb9cc268777fea95045"><div class="ttname"><a href="group___g_a01.html#a81d7aaf8d628afb9cc268777fea95045">RDA5807::rds_buffer2B</a></div><div class="ttdeci">char rds_buffer2B[33]</div><div class="ttdoc">RDS Radio Text buffer - Station Information.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8h_source.html#l00598">RDA5807.h:598</a></div></div>
<div class="ttc" id="agroup___g_a01_html_af7eb4e812ca7b0883a3e9c7879a034d9"><div class="ttname"><a href="group___g_a01.html#af7eb4e812ca7b0883a3e9c7879a034d9">RDA5807::rds_buffer2A</a></div><div class="ttdeci">char rds_buffer2A[65]</div><div class="ttdoc">RT - RDS Radio Text buffer - Program Information.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8h_source.html#l00597">RDA5807.h:597</a></div></div>
<div class="ttc" id="agroup___g_a01_html_class_r_d_a5807"><div class="ttname"><a href="group___g_a01.html#class_r_d_a5807">RDA5807</a></div><div class="ttdoc">KT0915 Class.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8h_source.html#l00567">RDA5807.h:568</a></div></div>
<div class="ttc" id="agroup___g_a02_html_ga1f4bc3d6f9d94171b2965dbb4e812f4f"><div class="ttname"><a href="group___g_a02.html#ga1f4bc3d6f9d94171b2965dbb4e812f4f">RDA5807::getStatus</a></div><div class="ttdeci">void * getStatus(uint8_t reg)</div><div class="ttdoc">Gets the register content of a given status register (from 0x0A to 0x0F)</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l00124">RDA5807.cpp:124</a></div></div>
<div class="ttc" id="agroup___g_a02_html_ga214f631aef72ece69db73c99879c7c46"><div class="ttname"><a href="group___g_a02.html#ga214f631aef72ece69db73c99879c7c46">RDA5807::powerDown</a></div><div class="ttdeci">void powerDown()</div><div class="ttdoc">Power the receiver off.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l00240">RDA5807.cpp:240</a></div></div>
<div class="ttc" id="agroup___g_a02_html_ga272444216a784ea5317c83783eb2bfe7"><div class="ttname"><a href="group___g_a02.html#ga272444216a784ea5317c83783eb2bfe7">RDA5807::setup</a></div><div class="ttdeci">void setup(uint8_t clock_frequency=CLOCK_32K, uint8_t oscillator_type=OSCILLATOR_TYPE_PASSIVE, uint8_t rlck_no_calibrate=RLCK_NO_CALIBRATE_MODE_OFF)</div><div class="ttdoc">Starts the device.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l00273">RDA5807.cpp:273</a></div></div>
<div class="ttc" id="agroup___g_a02_html_ga30d2b0c4662922df53bcef118663329c"><div class="ttname"><a href="group___g_a02.html#ga30d2b0c4662922df53bcef118663329c">RDA5807::powerUp</a></div><div class="ttdeci">void powerUp()</div><div class="ttdoc">Powers the receiver on.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l00197">RDA5807.cpp:197</a></div></div>
<div class="ttc" id="agroup___g_a02_html_ga3b581b82ab8c631cfec537a47008ddf3"><div class="ttname"><a href="group___g_a02.html#ga3b581b82ab8c631cfec537a47008ddf3">RDA5807::setRegister</a></div><div class="ttdeci">void setRegister(uint8_t reg, uint16_t value)</div><div class="ttdoc">Sets a given value to a specific device register.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l00154">RDA5807.cpp:154</a></div></div>
<div class="ttc" id="agroup___g_a02_html_ga3f6dace4c93f82ec66da5641e3e3fdaa"><div class="ttname"><a href="group___g_a02.html#ga3f6dace4c93f82ec66da5641e3e3fdaa">RDA5807::softReset</a></div><div class="ttdeci">void softReset()</div><div class="ttdoc">Resets the device.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l00187">RDA5807.cpp:187</a></div></div>
<div class="ttc" id="agroup___g_a02_html_ga3fe1feed45d3290beba0efef491128e6"><div class="ttname"><a href="group___g_a02.html#ga3fe1feed45d3290beba0efef491128e6">RDA5807::waitAndFinishTune</a></div><div class="ttdeci">void waitAndFinishTune()</div><div class="ttdoc">Waits for Seek or Tune finish.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l00173">RDA5807.cpp:173</a></div></div>
<div class="ttc" id="agroup___g_a02_html_ga677eff1084b294696a32e3ca4dfe593b"><div class="ttname"><a href="group___g_a02.html#ga677eff1084b294696a32e3ca4dfe593b">RDA5807::setGpio</a></div><div class="ttdeci">void setGpio(uint8_t gpioPin, uint8_t gpioSetup=0, int mcuPin=-1)</div><div class="ttdoc">Sets the Device GPIO pins.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l00034">RDA5807.cpp:34</a></div></div>
<div class="ttc" id="agroup___g_a02_html_gab97c1c8ad3ab0cd5d2852f712caee0a1"><div class="ttname"><a href="group___g_a02.html#gab97c1c8ad3ab0cd5d2852f712caee0a1">RDA5807::setNewDemodulateMethod</a></div><div class="ttdeci">void setNewDemodulateMethod(bool value)</div><div class="ttdoc">Sets new demodulate method. It can improve the receiver sensitivity about 1dB.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l00230">RDA5807.cpp:230</a></div></div>
<div class="ttc" id="agroup___g_a02_html_gab9e3a5584a6238f719e9c9e49435f5ce"><div class="ttname"><a href="group___g_a02.html#gab9e3a5584a6238f719e9c9e49435f5ce">RDA5807::getStatusRegisters</a></div><div class="ttdeci">void getStatusRegisters()</div><div class="ttdoc">Gets all current device status and RDS information registers (From 0x0A to 0x0F)</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l00079">RDA5807.cpp:79</a></div></div>
<div class="ttc" id="agroup___g_a02_html_gabd676c0e4ad20c6152a68f8daba64cb3"><div class="ttname"><a href="group___g_a02.html#gabd676c0e4ad20c6152a68f8daba64cb3">RDA5807::setInterruptMode</a></div><div class="ttdeci">void setInterruptMode(uint8_t value)</div><div class="ttdoc">Sets Interrupt Mode.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l00065">RDA5807.cpp:65</a></div></div>
<div class="ttc" id="agroup___g_a02_html_gad1d589d43adc89a93c5e07b2d4cb6a4c"><div class="ttname"><a href="group___g_a02.html#gad1d589d43adc89a93c5e07b2d4cb6a4c">RDA5807::getDeviceId</a></div><div class="ttdeci">uint16_t getDeviceId()</div><div class="ttdoc">Gets the Device identification.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l00291">RDA5807.cpp:291</a></div></div>
<div class="ttc" id="agroup___g_a03_html_ga13f6c6e974c768a9456c049645434ca1"><div class="ttname"><a href="group___g_a03.html#ga13f6c6e974c768a9456c049645434ca1">RDA5807::setBand3_50_65_Mode</a></div><div class="ttdeci">void setBand3_50_65_Mode(uint8_t band3Mode)</div><div class="ttdoc">Sets the band 3 mode: 50 to 65 MHZ or 65 to 76 MHz.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l00635">RDA5807.cpp:635</a></div></div>
<div class="ttc" id="agroup___g_a03_html_ga1476967ed4e1d9bc00e2ea8e3135520e"><div class="ttname"><a href="group___g_a03.html#ga1476967ed4e1d9bc00e2ea8e3135520e">RDA5807::getRealFrequency</a></div><div class="ttdeci">uint16_t getRealFrequency()</div><div class="ttdoc">Gets the current frequency bases on the current channel.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l00490">RDA5807.cpp:490</a></div></div>
<div class="ttc" id="agroup___g_a03_html_ga39480a49f7878fffe8c3ddf120aba2b0"><div class="ttname"><a href="group___g_a03.html#ga39480a49f7878fffe8c3ddf120aba2b0">RDA5807::getRealChannel</a></div><div class="ttdeci">uint16_t getRealChannel()</div><div class="ttdoc">Gets the current channel stored in 0x0A status register.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l00468">RDA5807.cpp:468</a></div></div>
<div class="ttc" id="agroup___g_a03_html_ga41dbf6ea359175b3671072a3c382d42c"><div class="ttname"><a href="group___g_a03.html#ga41dbf6ea359175b3671072a3c382d42c">RDA5807::setSeekThreshold</a></div><div class="ttdeci">void setSeekThreshold(uint8_t value)</div><div class="ttdoc">Sets RSSI Seek Threshold.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l00585">RDA5807.cpp:585</a></div></div>
<div class="ttc" id="agroup___g_a03_html_ga4b15ce7408d1d38989d9afdb6483b1f4"><div class="ttname"><a href="group___g_a03.html#ga4b15ce7408d1d38989d9afdb6483b1f4">RDA5807::setDirectFrequency</a></div><div class="ttdeci">void setDirectFrequency(uint16_t frequency)</div><div class="ttdoc">Sets the frequency using the reg08 (direct frequency)</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l00385">RDA5807.cpp:385</a></div></div>
<div class="ttc" id="agroup___g_a03_html_ga4e8db177fea475ea00fa04e3d8f1f08c"><div class="ttname"><a href="group___g_a03.html#ga4e8db177fea475ea00fa04e3d8f1f08c">RDA5807::setFrequencyUp</a></div><div class="ttdeci">void setFrequencyUp()</div><div class="ttdoc">Increments the current frequency.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l00424">RDA5807.cpp:424</a></div></div>
<div class="ttc" id="agroup___g_a03_html_ga4f8fe00a561c39d2dc9a0a143b1866e9"><div class="ttname"><a href="group___g_a03.html#ga4f8fe00a561c39d2dc9a0a143b1866e9">RDA5807::setFmDeemphasis</a></div><div class="ttdeci">void setFmDeemphasis(uint8_t de)</div><div class="ttdoc">Sets De-emphasis.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l00746">RDA5807.cpp:746</a></div></div>
<div class="ttc" id="agroup___g_a03_html_ga59b981002d383a13731bd939482a5236"><div class="ttname"><a href="group___g_a03.html#ga59b981002d383a13731bd939482a5236">RDA5807::getFrequency</a></div><div class="ttdeci">uint16_t getFrequency()</div><div class="ttdoc">Gets the current frequency.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l00454">RDA5807.cpp:454</a></div></div>
<div class="ttc" id="agroup___g_a03_html_ga6dd81b0cff50747906d7d05b127112de"><div class="ttname"><a href="group___g_a03.html#ga6dd81b0cff50747906d7d05b127112de">RDA5807::setSoftBlendEnable</a></div><div class="ttdeci">void setSoftBlendEnable(bool value)</div><div class="ttdoc">Sets Soft Blend.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l00308">RDA5807.cpp:308</a></div></div>
<div class="ttc" id="agroup___g_a03_html_ga76f6c3400b038aef15ba7318592e1dd0"><div class="ttname"><a href="group___g_a03.html#ga76f6c3400b038aef15ba7318592e1dd0">RDA5807::setSpace</a></div><div class="ttdeci">void setSpace(uint8_t space=0)</div><div class="ttdoc">Sets the FM channel space.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l00691">RDA5807.cpp:691</a></div></div>
<div class="ttc" id="agroup___g_a03_html_ga87de696f0a40724c19c89b6b48766020"><div class="ttname"><a href="group___g_a03.html#ga87de696f0a40724c19c89b6b48766020">RDA5807::seek</a></div><div class="ttdeci">void seek(uint8_t seek_mode, uint8_t direction)</div><div class="ttdoc">Seek function.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l00518">RDA5807.cpp:518</a></div></div>
<div class="ttc" id="agroup___g_a03_html_ga889cfe43f3f9c9ca92c9862261d5dbbf"><div class="ttname"><a href="group___g_a03.html#ga889cfe43f3f9c9ca92c9862261d5dbbf">RDA5807::setBand</a></div><div class="ttdeci">void setBand(uint8_t band=0)</div><div class="ttdoc">Sets the FM band. See table below.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l00621">RDA5807.cpp:621</a></div></div>
<div class="ttc" id="agroup___g_a03_html_ga8bbf57aaeb92f226179579efa61cc846"><div class="ttname"><a href="group___g_a03.html#ga8bbf57aaeb92f226179579efa61cc846">RDA5807::setStep</a></div><div class="ttdeci">void setStep(uint8_t step=100)</div><div class="ttdoc">Sets the FM Step;.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l00705">RDA5807.cpp:705</a></div></div>
<div class="ttc" id="agroup___g_a03_html_ga965658767399e2f923852144e324805f"><div class="ttname"><a href="group___g_a03.html#ga965658767399e2f923852144e324805f">RDA5807::setAFC</a></div><div class="ttdeci">void setAFC(bool value)</div><div class="ttdoc">Sets AFC true or false.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l00320">RDA5807.cpp:320</a></div></div>
<div class="ttc" id="agroup___g_a03_html_gaa9cfaddbd43257e810bb3817b021fa8a"><div class="ttname"><a href="group___g_a03.html#gaa9cfaddbd43257e810bb3817b021fa8a">RDA5807::setChannel</a></div><div class="ttdeci">void setChannel(uint16_t channel)</div><div class="ttdoc">Sets the channel.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l00338">RDA5807.cpp:338</a></div></div>
<div class="ttc" id="agroup___g_a03_html_gad16a6afa9520b77498b17a72c226305a"><div class="ttname"><a href="group___g_a03.html#gad16a6afa9520b77498b17a72c226305a">RDA5807::setFrequency</a></div><div class="ttdeci">void setFrequency(uint16_t frequency)</div><div class="ttdoc">Sets the frequency.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l00372">RDA5807.cpp:372</a></div></div>
<div class="ttc" id="agroup___g_a03_html_gadba771c864ace7a8373a76554b9d3e6a"><div class="ttname"><a href="group___g_a03.html#gadba771c864ace7a8373a76554b9d3e6a">RDA5807::setFrequencyDown</a></div><div class="ttdeci">void setFrequencyDown()</div><div class="ttdoc">Decrements the current frequency.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l00439">RDA5807.cpp:439</a></div></div>
<div class="ttc" id="agroup___g_a03_html_gade55e697c7752811086300e710727397"><div class="ttname"><a href="group___g_a03.html#gade55e697c7752811086300e710727397">RDA5807::seek</a></div><div class="ttdeci">void seek(uint8_t seek_mode, uint8_t direction, void(*showFunc)())</div><div class="ttdoc">Seek function.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l00559">RDA5807.cpp:559</a></div></div>
<div class="ttc" id="agroup___g_a03_html_gae0c05586e7230063b0c42fd5f4b24906"><div class="ttname"><a href="group___g_a03.html#gae0c05586e7230063b0c42fd5f4b24906">RDA5807::setFrequencyMode</a></div><div class="ttdeci">void setFrequencyMode(uint8_t value)</div><div class="ttdoc">Sets the frequency mode. If 1, then freq setting changed.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l00397">RDA5807.cpp:397</a></div></div>
<div class="ttc" id="agroup___g_a03_html_gaea595cf077e2a709bf927deddf8a63ba"><div class="ttname"><a href="group___g_a03.html#gaea595cf077e2a709bf927deddf8a63ba">RDA5807::getBand3Status</a></div><div class="ttdeci">uint8_t getBand3Status()</div><div class="ttdoc">Gets the status of the Band3.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l00649">RDA5807.cpp:649</a></div></div>
<div class="ttc" id="agroup___g_a04_html_ga04e5fe0cacbdcae620388a15630cf9c1"><div class="ttname"><a href="group___g_a04.html#ga04e5fe0cacbdcae620388a15630cf9c1">RDA5807::getRdsFlagAB</a></div><div class="ttdeci">uint8_t getRdsFlagAB(void)</div><div class="ttdoc">Returns the current Text Flag A/B.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l00837">RDA5807.cpp:837</a></div></div>
<div class="ttc" id="agroup___g_a04_html_ga196b453f68b2a23d2e6b2515c6412ee2"><div class="ttname"><a href="group___g_a04.html#ga196b453f68b2a23d2e6b2515c6412ee2">RDA5807::clearRdsFifo</a></div><div class="ttdeci">void clearRdsFifo(bool value=1)</div><div class="ttdoc">Clear RDS fifo.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l01262">RDA5807.cpp:1262</a></div></div>
<div class="ttc" id="agroup___g_a04_html_ga22c43e0f08a650bd32446eef6cd8f550"><div class="ttname"><a href="group___g_a04.html#ga22c43e0f08a650bd32446eef6cd8f550">RDA5807::clearRdsBuffer</a></div><div class="ttdeci">void clearRdsBuffer()</div><div class="ttdoc">Clear RDS Information (Station Name, Station Information, Program Information and Time)</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l01274">RDA5807.cpp:1274</a></div></div>
<div class="ttc" id="agroup___g_a04_html_ga32c361b9b996a5920519315aa86d174d"><div class="ttname"><a href="group___g_a04.html#ga32c361b9b996a5920519315aa86d174d">RDA5807::getRdsGroupType</a></div><div class="ttdeci">uint16_t getRdsGroupType()</div><div class="ttdoc">Return the group type.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l00913">RDA5807.cpp:913</a></div></div>
<div class="ttc" id="agroup___g_a04_html_ga3ab713bb63978518d42a761b9db445c9"><div class="ttname"><a href="group___g_a04.html#ga3ab713bb63978518d42a761b9db445c9">RDA5807::getNext4Block</a></div><div class="ttdeci">void getNext4Block(char *c)</div><div class="ttdoc">Process data received from group 2A.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l00993">RDA5807.cpp:993</a></div></div>
<div class="ttc" id="agroup___g_a04_html_ga482098a64299cb8af976d4d10a460212"><div class="ttname"><a href="group___g_a04.html#ga482098a64299cb8af976d4d10a460212">RDA5807::getRdsText2A</a></div><div class="ttdeci">char * getRdsText2A(void)</div><div class="ttdoc">Gets the Program Information.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l01065">RDA5807.cpp:1065</a></div></div>
<div class="ttc" id="agroup___g_a04_html_ga4b741f1433eda57949bb40fa9e973732"><div class="ttname"><a href="group___g_a04.html#ga4b741f1433eda57949bb40fa9e973732">RDA5807::setRDS</a></div><div class="ttdeci">void setRDS(bool value)</div><div class="ttdoc">Sets the RDS operation.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l00778">RDA5807.cpp:778</a></div></div>
<div class="ttc" id="agroup___g_a04_html_ga5a26789f1910a5b2098919dbd50e6a3c"><div class="ttname"><a href="group___g_a04.html#ga5a26789f1910a5b2098919dbd50e6a3c">RDA5807::getRdsText0A</a></div><div class="ttdeci">char * getRdsText0A(void)</div><div class="ttdoc">Gets the station name and other messages.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l01035">RDA5807.cpp:1035</a></div></div>
<div class="ttc" id="agroup___g_a04_html_ga6afb347f32121c480adea2a36032d56f"><div class="ttname"><a href="group___g_a04.html#ga6afb347f32121c480adea2a36032d56f">RDA5807::getNext2Block</a></div><div class="ttdeci">void getNext2Block(char *c)</div><div class="ttdoc">Process data received from group 2B.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l00956">RDA5807.cpp:956</a></div></div>
<div class="ttc" id="agroup___g_a04_html_gaa3432b4df8ec20277e3d3be60782b395"><div class="ttname"><a href="group___g_a04.html#gaa3432b4df8ec20277e3d3be60782b395">RDA5807::getRdsLocalTime</a></div><div class="ttdeci">char * getRdsLocalTime()</div><div class="ttdoc">Gets the RDS time converted to local time.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l01185">RDA5807.cpp:1185</a></div></div>
<div class="ttc" id="agroup___g_a04_html_gac6b8c39c1134700ce3e2a9e5216a5325"><div class="ttname"><a href="group___g_a04.html#gac6b8c39c1134700ce3e2a9e5216a5325">RDA5807::hasRdsInfoAB</a></div><div class="ttdeci">bool hasRdsInfoAB()</div><div class="ttdoc">Returns true when the RDS system has valid information.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8h_source.html#l00969">RDA5807.h:969</a></div></div>
<div class="ttc" id="agroup___g_a04_html_gacd6614bc7be99d55a3d9a17739ee7074"><div class="ttname"><a href="group___g_a04.html#gacd6614bc7be99d55a3d9a17739ee7074">RDA5807::getRdsText2B</a></div><div class="ttdeci">char * getRdsText2B(void)</div><div class="ttdoc">Gets the Station Information.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l01095">RDA5807.cpp:1095</a></div></div>
<div class="ttc" id="agroup___g_a04_html_gacfa48dfcf792a9bcee489658177aed90"><div class="ttname"><a href="group___g_a04.html#gacfa48dfcf792a9bcee489658177aed90">RDA5807::getRdsReady</a></div><div class="ttdeci">bool getRdsReady()</div><div class="ttdoc">Returns true if RDS Ready.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l00822">RDA5807.cpp:822</a></div></div>
<div class="ttc" id="agroup___g_a04_html_gad602518e28efa9abb8319f1f25480551"><div class="ttname"><a href="group___g_a04.html#gad602518e28efa9abb8319f1f25480551">RDA5807::isNewRdsFlagAB</a></div><div class="ttdeci">bool isNewRdsFlagAB(void)</div><div class="ttdoc">Returns true if the Text Flag A/B has changed.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l00854">RDA5807.cpp:854</a></div></div>
<div class="ttc" id="agroup___g_a04_html_gad85ccedd8baecd8bc2f42325a3ee8741"><div class="ttname"><a href="group___g_a04.html#gad85ccedd8baecd8bc2f42325a3ee8741">RDA5807::getRdsVersionCode</a></div><div class="ttdeci">uint8_t getRdsVersionCode(void)</div><div class="ttdoc">Gets the version code (extracted from the Block B)</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l00927">RDA5807.cpp:927</a></div></div>
<div class="ttc" id="agroup___g_a04_html_gadafba5991f6f60a52ad73fdda8fac984"><div class="ttname"><a href="group___g_a04.html#gadafba5991f6f60a52ad73fdda8fac984">RDA5807::getRdsAllData</a></div><div class="ttdeci">bool getRdsAllData(char **stationName, char **stationInformation, char **programInformation, char **utcTime)</div><div class="ttdoc">Gets Station Name, Station Information, Program Information and utcTime.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l00893">RDA5807.cpp:893</a></div></div>
<div class="ttc" id="agroup___g_a04_html_gae27337170a5f3dedebf585aa19855ad6"><div class="ttname"><a href="group___g_a04.html#gae27337170a5f3dedebf585aa19855ad6">RDA5807::setRdsFifo</a></div><div class="ttdeci">void setRdsFifo(bool value)</div><div class="ttdoc">Sets RDS fifo mode enable.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l01249">RDA5807.cpp:1249</a></div></div>
<div class="ttc" id="agroup___g_a04_html_gae3bde947a89c6dadfc4dc22aea85b467"><div class="ttname"><a href="group___g_a04.html#gae3bde947a89c6dadfc4dc22aea85b467">RDA5807::getRdsProgramType</a></div><div class="ttdeci">uint8_t getRdsProgramType(void)</div><div class="ttdoc">Returns the Program Type (extracted from the Block B)</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l00943">RDA5807.cpp:943</a></div></div>
<div class="ttc" id="agroup___g_a04_html_gaecbab42ef08c486b2eb1ab25649c921a"><div class="ttname"><a href="group___g_a04.html#gaecbab42ef08c486b2eb1ab25649c921a">RDA5807::setRBDS</a></div><div class="ttdeci">void setRBDS(bool value)</div><div class="ttdoc">Sets the RBDS operation.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l00792">RDA5807.cpp:792</a></div></div>
<div class="ttc" id="agroup___g_a04_html_gaef398d848e7378ec4897965b8e1b4441"><div class="ttname"><a href="group___g_a04.html#gaef398d848e7378ec4897965b8e1b4441">RDA5807::getRdsTime</a></div><div class="ttdeci">char * getRdsTime()</div><div class="ttdoc">Gets the RDS UTC time and date when the Group type is 4.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l01122">RDA5807.cpp:1122</a></div></div>
<div class="ttc" id="agroup___g_a06_html_ga2070bff9af95a523a77ac304eee7b22f"><div class="ttname"><a href="group___g_a06.html#ga2070bff9af95a523a77ac304eee7b22f">RDA5807::setI2SAllParameters</a></div><div class="ttdeci">void setI2SAllParameters(uint8_t R_DELY, uint8_t L_DELY, uint8_t SCLK_O_EDGE, uint8_t SW_O_EDGE, uint8_t I2S_SW_CNT, uint8_t WS_I_EDGE, uint8_t DATA_SIGNED, uint8_t SCLK_I_EDGE, uint8_t WS_LR, uint8_t SLAVE_MASTER, uint8_t OPEN_MODE)</div><div class="ttdoc">Configures all parameters for I2S.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l01386">RDA5807.cpp:1386</a></div></div>
<div class="ttc" id="agroup___g_a06_html_ga3d5618cd755c0a56fea68ea589bb828f"><div class="ttname"><a href="group___g_a06.html#ga3d5618cd755c0a56fea68ea589bb828f">RDA5807::setI2SSpeed</a></div><div class="ttdeci">void setI2SSpeed(uint8_t value)</div><div class="ttdoc">Sets the speed in kbps. You can use the predefined constantes: I2S_WS_STEP_48, I2S_WS_STEP_44_1,...</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l01435">RDA5807.cpp:1435</a></div></div>
<div class="ttc" id="agroup___g_a06_html_ga70f086ccb3be49c4c51133bae2e8b113"><div class="ttname"><a href="group___g_a06.html#ga70f086ccb3be49c4c51133bae2e8b113">RDA5807::setI2SMaster</a></div><div class="ttdeci">void setI2SMaster(bool value)</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l01422">RDA5807.cpp:1422</a></div></div>
<div class="ttc" id="agroup___g_a06_html_gabeb9446fc371fe58e075bea7ebc51fdb"><div class="ttname"><a href="group___g_a06.html#gabeb9446fc371fe58e075bea7ebc51fdb">RDA5807::setI2SDataSigned</a></div><div class="ttdeci">void setI2SDataSigned(bool value)</div><div class="ttdoc">If 0, I2S output unsigned 16-bit audio data. If 1, I2S output signed 16-bit audio data.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l01447">RDA5807.cpp:1447</a></div></div>
<div class="ttc" id="agroup___g_a06_html_gafe324014c135a510714e7d722f291273"><div class="ttname"><a href="group___g_a06.html#gafe324014c135a510714e7d722f291273">RDA5807::setI2SOn</a></div><div class="ttdeci">void setI2SOn(bool value)</div><div class="ttdoc">Enables I2S setup.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l01410">RDA5807.cpp:1410</a></div></div>
<div class="ttc" id="agroup___g_a07_html_ga250ff3788a7831dae3c6200919b446dd"><div class="ttname"><a href="group___g_a07.html#ga250ff3788a7831dae3c6200919b446dd">RDA5807::isStereo</a></div><div class="ttdeci">bool isStereo()</div><div class="ttdoc">Gets the current Stereo status.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l01526">RDA5807.cpp:1526</a></div></div>
<div class="ttc" id="agroup___g_a07_html_ga51bf4344ebeb44f7170265901df870f5"><div class="ttname"><a href="group___g_a07.html#ga51bf4344ebeb44f7170265901df870f5">RDA5807::setVolume</a></div><div class="ttdeci">void setVolume(uint8_t value)</div><div class="ttdoc">Sets the audio volume level.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l01556">RDA5807.cpp:1556</a></div></div>
<div class="ttc" id="agroup___g_a07_html_ga743d91d820922b3feda10d06443bc8a9"><div class="ttname"><a href="group___g_a07.html#ga743d91d820922b3feda10d06443bc8a9">RDA5807::getVolume</a></div><div class="ttdeci">uint8_t getVolume()</div><div class="ttdoc">Gets the current audio volume level.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l01571">RDA5807.cpp:1571</a></div></div>
<div class="ttc" id="agroup___g_a07_html_ga8002bb394ef19db02e04a39de04dffc5"><div class="ttname"><a href="group___g_a07.html#ga8002bb394ef19db02e04a39de04dffc5">RDA5807::setBass</a></div><div class="ttdeci">void setBass(bool value)</div><div class="ttdoc">Sets Bass Boost.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l01513">RDA5807.cpp:1513</a></div></div>
<div class="ttc" id="agroup___g_a07_html_ga864af32df4d3365e03f8876703218283"><div class="ttname"><a href="group___g_a07.html#ga864af32df4d3365e03f8876703218283">RDA5807::setVolumeUp</a></div><div class="ttdeci">void setVolumeUp()</div><div class="ttdoc">Increments the audio volume.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l01581">RDA5807.cpp:1581</a></div></div>
<div class="ttc" id="agroup___g_a07_html_ga910965f74897b0246a0b3bed39743d8c"><div class="ttname"><a href="group___g_a07.html#ga910965f74897b0246a0b3bed39743d8c">RDA5807::setVolumeDown</a></div><div class="ttdeci">void setVolumeDown()</div><div class="ttdoc">Decrements the audio volume.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l01595">RDA5807.cpp:1595</a></div></div>
<div class="ttc" id="agroup___g_a07_html_gaabd554f39778bf6d81712df0ea72d0fa"><div class="ttname"><a href="group___g_a07.html#gaabd554f39778bf6d81712df0ea72d0fa">RDA5807::setAudioOutputHighImpedance</a></div><div class="ttdeci">void setAudioOutputHighImpedance(bool value)</div><div class="ttdoc">Sets audio output impedance high ow low.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l01487">RDA5807.cpp:1487</a></div></div>
<div class="ttc" id="agroup___g_a07_html_gad6e77ffbeb3f4dc885548130e09590d6"><div class="ttname"><a href="group___g_a07.html#gad6e77ffbeb3f4dc885548130e09590d6">RDA5807::setMono</a></div><div class="ttdeci">void setMono(bool value)</div><div class="ttdoc">Sets audio Mono or stereo.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l01500">RDA5807.cpp:1500</a></div></div>
<div class="ttc" id="agroup___g_a07_html_gadd2c2ab8b861ab0714fdeb99c774d656"><div class="ttname"><a href="group___g_a07.html#gadd2c2ab8b861ab0714fdeb99c774d656">RDA5807::setSoftmute</a></div><div class="ttdeci">void setSoftmute(bool value)</div><div class="ttdoc">Sets Soft Mute Enable or disable.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l01463">RDA5807.cpp:1463</a></div></div>
<div class="ttc" id="agroup___g_a07_html_gafec3018913d735ee0684b88cf503c84a"><div class="ttname"><a href="group___g_a07.html#gafec3018913d735ee0684b88cf503c84a">RDA5807::setMute</a></div><div class="ttdeci">void setMute(bool value)</div><div class="ttdoc">Sets Audio mute or unmute.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l01474">RDA5807.cpp:1474</a></div></div>
<div class="ttc" id="agroup___g_a08_html_ga35428e147462af6490c382acdf769173"><div class="ttname"><a href="group___g_a08.html#ga35428e147462af6490c382acdf769173">RDA5807::setLnaIcSel</a></div><div class="ttdeci">void setLnaIcSel(uint8_t value)</div><div class="ttdoc">Sets LNA_ICSEL_BIT.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l01615">RDA5807.cpp:1615</a></div></div>
<div class="ttc" id="agroup___g_a08_html_ga4bd7597d4c9090b04486aec21a6a0a5d"><div class="ttname"><a href="group___g_a08.html#ga4bd7597d4c9090b04486aec21a6a0a5d">RDA5807::getRssi</a></div><div class="ttdeci">int getRssi()</div><div class="ttdoc">Gets the current Rssi.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l01640">RDA5807.cpp:1640</a></div></div>
<div class="ttc" id="agroup___g_a08_html_gaf595aab626e55ab733af8682674faa61"><div class="ttname"><a href="group___g_a08.html#gaf595aab626e55ab733af8682674faa61">RDA5807::setLnaPortSel</a></div><div class="ttdeci">void setLnaPortSel(uint8_t value)</div><div class="ttdoc">Sets LNA input port selection bit.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l01627">RDA5807.cpp:1627</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_0ed30cf5299dd8c40b2402f14fb7e6ee.html">RDA5807</a></li><li class="navelem"><a class="el" href="dir_42636baf320234a3d533ded6f955c5be.html">src</a></li><li class="navelem"><a class="el" href="_r_d_a5807_8cpp.html">RDA5807.cpp</a></li>
    <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
  </ul>
</div>
</body>
</html>
